Fix newline handling in autoreload test

This commit is contained in:
Sven 2017-06-09 18:38:51 +02:00
parent c40cdb930b
commit 7f1a58f9fa
1 changed files with 5 additions and 3 deletions

View File

@ -40,7 +40,9 @@ class AutoreloadTest(unittest.TestCase):
if 'PYTHONPATH' in os.environ: if 'PYTHONPATH' in os.environ:
pythonpath += os.pathsep + os.environ['PYTHONPATH'] pythonpath += os.pathsep + os.environ['PYTHONPATH']
p = Popen([sys.executable, '-m', 'testapp'], stdout=subprocess.PIPE, p = Popen(
cwd=path, env=dict(os.environ, PYTHONPATH=pythonpath)) [sys.executable, '-m', 'testapp'], stdout=subprocess.PIPE,
out = p.communicate()[0].decode() cwd=path, env=dict(os.environ, PYTHONPATH=pythonpath),
universal_newlines=True)
out = p.communicate()[0]
self.assertEqual(out, 'Starting\nStarting\n') self.assertEqual(out, 'Starting\nStarting\n')