diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-09-24 10:22:33 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-04-15 10:08:01 -0400 |
commit | 631efd7c571a0ec41854f28ea65707804955f692 (patch) | |
tree | bb6274596546528af2bbec3b02cbf8fe8418e450 | |
parent | 17957da7467bda4a760e7c78ccf8fdc4adf61a39 (diff) | |
download | python-coveragepy-git-631efd7c571a0ec41854f28ea65707804955f692.tar.gz |
Add a failing test for #708
-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 |