Skip to content

Commit 3fa21ab

Browse files
fix Python 3 test
1 parent 82b39bf commit 3fa21ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bpython/test/test_args.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ class TestExecArgs(unittest.TestCase):
1010
def test_exec_dunder_file(self):
1111
with tempfile.NamedTemporaryFile(delete=False) as f:
1212
f.write(
13-
"import sys; print 'hello'; sys.stderr.write(__file__); sys.stderr.flush();")
13+
"import sys; sys.stderr.write(__file__); sys.stderr.flush();".encode('ascii'))
1414
f.flush()
1515
print open(f.name).read()
16-
p = subprocess.Popen(['bpython-curtsies', f.name], stderr= subprocess.PIPE)
17-
18-
self.assertEquals(p.stderr.read().strip(), f.name)
16+
p = subprocess.Popen(['bpython-curtsies', f.name], stderr=subprocess.PIPE)
17+
18+
self.assertEquals(p.stderr.read().strip().decode('ascii'), f.name)
1919

2020

0 commit comments

Comments
 (0)