summaryrefslogtreecommitdiff
path: root/test/test_testing.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-28 20:24:36 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-28 20:24:36 -0500
commit8a3a85b1c0cbbe2d1afb781784fdee54962b3e45 (patch)
tree402a47ee0b6c945cfc7bd62d798d95548827b534 /test/test_testing.py
parent504e53d985234ae5476dafc559010da8cb2e8d35 (diff)
downloadpython-coveragepy-8a3a85b1c0cbbe2d1afb781784fdee54962b3e45.tar.gz
Fix this test
Diffstat (limited to 'test/test_testing.py')
-rw-r--r--test/test_testing.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_testing.py b/test/test_testing.py
index 64c35e3..c8672e4 100644
--- a/test/test_testing.py
+++ b/test/test_testing.py
@@ -184,8 +184,10 @@ class CoverageTestTest(CoverageTest):
# Try it with a "coverage debug sys" command.
out = self.run_command("coverage debug sys").splitlines()
+ # "environment: COV_FOOBAR = XYZZY" or "COV_FOOBAR = XYZZY"
executable = [l for l in out if "executable:" in l][0]
executable = executable.split(":", 1)[1].strip()
self.assertEqual(executable, sys.executable)
- environ = [l for l in out if "COV_FOOBAR" in l][0].strip()
- self.assertEqual(environ, "COV_FOOBAR = XYZZY")
+ environ = [l for l in out if "COV_FOOBAR" in l][0]
+ _, _, environ = environ.rpartition(":")
+ self.assertEqual(environ.strip(), "COV_FOOBAR = XYZZY")