Skip to content

Commit 80d35b4

Browse files
committed
Use text mode for temporary Python file in tests.
Thanks @myint
1 parent fa08a03 commit 80d35b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/test/test_curtsies_repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_repl(self):
102102
def test_interactive(self):
103103
interp = code.InteractiveInterpreter(locals={})
104104
with captured_output() as (out, err):
105-
with tempfile.NamedTemporaryFile(suffix='.py') as f:
105+
with tempfile.NamedTemporaryFile(mode='w', suffix='.py') as f:
106106
f.write('from __future__ import division\n')
107107
f.write('print 1/2\n')
108108
f.flush()

0 commit comments

Comments
 (0)