summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-07-29 11:12:49 -0400
committerNed Batchelder <ned@nedbatchelder.com>2016-07-29 11:12:49 -0400
commit7a03eb3c52c20e52cfac48da912a275df2a72338 (patch)
tree00423e709040884039915c77c9a83f50b9c3822a /tests
parent7019acafea5cab00ca84649a12d8276c08c58c40 (diff)
downloadpython-coveragepy-7a03eb3c52c20e52cfac48da912a275df2a72338.tar.gz
Add a test that .pth measurement doesn't include existing data
Diffstat (limited to 'tests')
-rw-r--r--tests/test_process.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 5848b9f..53d2362 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1088,6 +1088,13 @@ class ProcessStartupTest(ProcessCoverageMixin, CoverageTest):
if env.METACOV:
self.skipTest("Can't test sub-process pth file suppport during metacoverage")
+ # An existing data file should not be read when a subprocess gets
+ # measured automatically. Create the data file here with bogus data in
+ # it.
+ data = coverage.CoverageData()
+ data.add_lines({os.path.abspath('sub.py'): dict.fromkeys(range(100))})
+ data.write_file(".mycovdata")
+
self.make_file("coverage.ini", """\
[run]
data_file = .mycovdata