summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_data.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_data.py b/tests/test_data.py
index 25f0f57e..2d3f164c 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -473,6 +473,12 @@ class CoverageDataTest(DataTestHelpers, CoverageTest):
covdata.touch_file("abc.py")
assert covdata.has_arcs()
+ def test_cant_touch_in_empty_data(self):
+ covdata = CoverageData()
+ msg = "Can't touch files in an empty CoverageData"
+ with pytest.raises(CoverageException, match=msg):
+ covdata.touch_file("abc.py")
+
def test_read_and_write_are_opposites(self):
covdata1 = CoverageData()
covdata1.add_arcs(ARCS_3)