Kaydet (Commit) 9c92a691 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Fix test_venv to work with universal newlines (issue #13119)

üst 6f1a40ff
...@@ -111,7 +111,7 @@ class BasicTest(BaseTest): ...@@ -111,7 +111,7 @@ class BasicTest(BaseTest):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()
self.assertEqual(out[:-1], expected.encode()) self.assertEqual(out.strip(), expected.encode())
def test_overwrite_existing(self): def test_overwrite_existing(self):
""" """
...@@ -179,7 +179,7 @@ class BasicTest(BaseTest): ...@@ -179,7 +179,7 @@ class BasicTest(BaseTest):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()
self.assertEqual(out[:-1], envpy.encode()) self.assertEqual(out.strip(), envpy.encode())
@unittest.skipUnless(can_symlink(), 'Needs symlinks') @unittest.skipUnless(can_symlink(), 'Needs symlinks')
def test_executable_symlinks(self): def test_executable_symlinks(self):
...@@ -194,7 +194,7 @@ class BasicTest(BaseTest): ...@@ -194,7 +194,7 @@ class BasicTest(BaseTest):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()
self.assertEqual(out[:-1], envpy.encode()) self.assertEqual(out.strip(), envpy.encode())
def test_main(): def test_main():
run_unittest(BasicTest) run_unittest(BasicTest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment