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
commit1b1ec1268f147344d05588f6fc5a0902f68d995d (patch)
treeea571046475ce37a6520669ce532d122cf13e631 /test/test_execfile.py
parenta13a2c89da9bbe9cabc54af293c8c73339cc268a (diff)
downloadpython-coveragepy-git-1b1ec1268f147344d05588f6fc5a0902f68d995d.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 9c838e1a..aee4eeb3 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)