From 7f1a58f9faacb0bb0e95c2527a348195742eb866 Mon Sep 17 00:00:00 2001 From: Sven Date: Fri, 9 Jun 2017 18:38:51 +0200 Subject: [PATCH] Fix newline handling in autoreload test --- tornado/test/autoreload_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tornado/test/autoreload_test.py b/tornado/test/autoreload_test.py index b0390a19..6a9729db 100644 --- a/tornado/test/autoreload_test.py +++ b/tornado/test/autoreload_test.py @@ -40,7 +40,9 @@ class AutoreloadTest(unittest.TestCase): if 'PYTHONPATH' in os.environ: pythonpath += os.pathsep + os.environ['PYTHONPATH'] - p = Popen([sys.executable, '-m', 'testapp'], stdout=subprocess.PIPE, - cwd=path, env=dict(os.environ, PYTHONPATH=pythonpath)) - out = p.communicate()[0].decode() + p = Popen( + [sys.executable, '-m', 'testapp'], stdout=subprocess.PIPE, + cwd=path, env=dict(os.environ, PYTHONPATH=pythonpath), + universal_newlines=True) + out = p.communicate()[0] self.assertEqual(out, 'Starting\nStarting\n')