summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-03-10 11:02:31 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-03-10 11:02:31 -0400
commitee6cf0c30ea149ce07b224c44fbf7bf51bb0c237 (patch)
treec576b970d282fc71face33a8b218f8b79428bb24
parent314f2f10e7d3e48cb3dea96f1079ca96e2e9be4d (diff)
downloadpython-coveragepy-ee6cf0c30ea149ce07b224c44fbf7bf51bb0c237.tar.gz
When writing the actual annotation results, include the Python version number so running alltests won't erase results from earlier Python versions.
-rw-r--r--test_coverage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test_coverage.py b/test_coverage.py
index a352b6c..a69852d 100644
--- a/test_coverage.py
+++ b/test_coverage.py
@@ -151,7 +151,8 @@ class CoverageTest(unittest.TestCase):
coverage.annotate([modname+'.py'])
expect = (path.path(self.olddir) / annfile).text()
actual = path.path(modname + '.py,cover').text()
- out = path.path(self.olddir) / (annfile + "_actual")
+ # Write the actual results into a file for comparison.
+ out = path.path(self.olddir) / (annfile + "_actual_%s%s" % (sys.version_info[:2]))
# Check if the results are right
if expect == actual:
# They are right: delete the old test results if they are still