summaryrefslogtreecommitdiff
path: root/test/test_execfile.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-07-08 15:09:12 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-07-08 15:09:12 -0400
commit7020d627529a84fd11de6abc61188e83efbe001c (patch)
tree4c46c0f5c01bdbf4c5ca6c73ce281acba10297e6 /test/test_execfile.py
parenta4657384385e82ac77e5c4f6b28df664da7dac51 (diff)
downloadpython-coveragepy-7020d627529a84fd11de6abc61188e83efbe001c.tar.gz
Py3k: bytes vs. strings, and one more print statement.
Diffstat (limited to 'test/test_execfile.py')
-rw-r--r--test/test_execfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_execfile.py b/test/test_execfile.py
index 9c838e1..aee4eeb 100644
--- a/test/test_execfile.py
+++ b/test/test_execfile.py
@@ -49,10 +49,10 @@ class RunTest(CoverageTest):
def test_universal_newlines(self):
# Make sure we can read any sort of line ending.
- pylines = """# try newlines|print 'Hello, world!'|""".split('|')
+ pylines = """# try newlines|print('Hello, world!')|""".split('|')
for nl in ('\n', '\r\n', '\r'):
fpy = open('nl.py', 'wb')
- fpy.write(nl.join(pylines))
+ fpy.write(nl.join(pylines).encode('utf-8'))
fpy.close()
run_python_file('nl.py', ['nl.py'])
self.assertEqual(self.stdout(), "Hello, world!\n"*3)