diff options
-rw-r--r-- | tests/test_api.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 755a89a2..24fe8776 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -420,6 +420,21 @@ class ApiTest(CoverageTest): self.assertEqual(statements, [1, 2]) self.assertEqual(missing, [1, 2]) + def test_combining_with_a_used_coverage(self): + # Can you use a coverage object to run one shard of a parallel suite, + # and then also combine the data? + self.make_code1_code2() + cov = coverage.Coverage(data_suffix=True) + self.start_import_stop(cov, "code1") + cov.save() + + cov = coverage.Coverage(data_suffix=True) + self.start_import_stop(cov, "code2") + cov.save() + + cov.combine() + self.check_code1_code2(cov) + def test_warnings(self): self.make_file("hello.py", """\ import sys, os |