From 1b1ec1268f147344d05588f6fc5a0902f68d995d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 8 Jul 2009 15:09:12 -0400 Subject: Py3k: bytes vs. strings, and one more print statement. --- test/test_execfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_execfile.py') 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) -- cgit v1.2.1