summaryrefslogtreecommitdiff
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
commit78612ba0743bc6822285a05ea68bf657cbaa9322 (patch)
treec08bcfa9c3366ab7b130b87604f6b74eb4048afc
parent786b563a3f6e1da21f52f3b210de89daba3be897 (diff)
downloadpython-coveragepy-git-78612ba0743bc6822285a05ea68bf657cbaa9322.tar.gz
Fix this test
-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 64c35e36..c8672e49 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")