Skip to content

Commit c56439d

Browse files
ignore nonreplacement of sys attribute in Python 3
1 parent 2589671 commit c56439d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/test/test_sitefix.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import optparse
33

44
from bpython.test import FixLanguageTestCase as TestCase
5+
from bpython._py3compat import py3
56

67
from bpython.curtsiesfrontend import sitefix
78

@@ -39,4 +40,6 @@ def test_reload_sys(self):
3940
sitefix.reload(sys)
4041
self.assertEqual(sys.a, 2) # new attrs stick around
4142
self.assertEqual(sys.stdin, 1) # stdin stays
42-
self.assertNotEqual(sys.version, 3) # others replaced
43+
if not py3:
44+
# In Python 3 sys attributes are not replaced on reload
45+
self.assertNotEqual(sys.version, 3) # in Python 2

0 commit comments

Comments
 (0)