summaryrefslogtreecommitdiff
path: root/tests/test_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_data.py')
-rw-r--r--tests/test_data.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_data.py b/tests/test_data.py
index e09aaf44..eb389e35 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -428,6 +428,22 @@ class CoverageDataTest(DataTestHelpers, CoverageTest):
with self.assertRaisesRegex(CoverageException, msg):
covdata2.update(covdata1)
+ def test_update_lines_empty(self):
+ covdata1 = CoverageData(suffix='1')
+ covdata1.add_lines(LINES_1)
+
+ covdata2 = CoverageData(suffix='2')
+ covdata1.update(covdata2)
+ self.assert_line_counts(covdata1, SUMMARY_1)
+
+ def test_update_arcs_empty(self):
+ covdata1 = CoverageData(suffix='1')
+ covdata1.add_arcs(ARCS_3)
+
+ covdata2 = CoverageData(suffix='2')
+ covdata1.update(covdata2)
+ self.assert_line_counts(covdata1, SUMMARY_3)
+
def test_asking_isnt_measuring(self):
# Asking about an unmeasured file shouldn't make it seem measured.
covdata = CoverageData()