summaryrefslogtreecommitdiff
path: root/tests/test_data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-08-11 08:46:56 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-08-11 08:46:56 -0400
commite70a13b69912591a81dfded0261fa3f847232ba1 (patch)
treebf764cbd8f14232b5b77365ec588e0243d4f5ffc /tests/test_data.py
parent420c1b10ddeed1da66a2ffb81d7ac2af32939be5 (diff)
downloadpython-coveragepy-git-e70a13b69912591a81dfded0261fa3f847232ba1.tar.gz
Don't add data by asking about data
Diffstat (limited to 'tests/test_data.py')
-rw-r--r--tests/test_data.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_data.py b/tests/test_data.py
index 5e75b012..b2e4644c 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -361,6 +361,13 @@ class CoverageDataTest(DataTestHelpers, CoverageTest):
with self.assertRaisesRegex(CoverageException, msg):
covdata2.update(covdata1)
+ def test_asking_isnt_measuring(self):
+ # Asking about an unmeasured file shouldn't make it seem measured.
+ covdata = CoverageData()
+ self.assert_measured_files(covdata, [])
+ self.assertEqual(covdata.arcs("missing.py"), None)
+ self.assert_measured_files(covdata, [])
+
def test_add_to_hash_with_lines(self):
covdata = CoverageData()
covdata.add_lines(LINES_1)