diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-29 11:12:49 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-29 11:12:49 -0400 |
commit | 82f1033878b5e2a16580a159e1dd4480c0145e3b (patch) | |
tree | e452e0a9c17c3a524ef2dafa1a9b373e3741d21b /tests/test_process.py | |
parent | 346658e7b38a1ce8ea86308879de3a0288a4d899 (diff) | |
download | python-coveragepy-git-82f1033878b5e2a16580a159e1dd4480c0145e3b.tar.gz |
Add a test that .pth measurement doesn't include existing data
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 5848b9ff..53d2362a 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 |