diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-04 22:33:10 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-04 22:33:10 (GMT) |
commit | 9c92a691e1f0f889fffd22a48d02ceaea38c05c6 (patch) | |
tree | 189fa20b5c23a64bcbea0b60fa34060d9275cef0 /Lib | |
parent | 6f1a40ffd3d756f2f83bf7c93b25401c6aeb1bdc (diff) | |
download | cpython-9c92a691e1f0f889fffd22a48d02ceaea38c05c6.zip cpython-9c92a691e1f0f889fffd22a48d02ceaea38c05c6.tar.gz cpython-9c92a691e1f0f889fffd22a48d02ceaea38c05c6.tar.bz2 |
Fix test_venv to work with universal newlines (issue #13119)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_venv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index b1b831e..9696844 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -111,7 +111,7 @@ class BasicTest(BaseTest): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - self.assertEqual(out[:-1], expected.encode()) + self.assertEqual(out.strip(), expected.encode()) def test_overwrite_existing(self): """ @@ -179,7 +179,7 @@ class BasicTest(BaseTest): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - self.assertEqual(out[:-1], envpy.encode()) + self.assertEqual(out.strip(), envpy.encode()) @unittest.skipUnless(can_symlink(), 'Needs symlinks') def test_executable_symlinks(self): @@ -194,7 +194,7 @@ class BasicTest(BaseTest): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - self.assertEqual(out[:-1], envpy.encode()) + self.assertEqual(out.strip(), envpy.encode()) def test_main(): run_unittest(BasicTest) |