diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-18 06:16:55 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-18 12:12:27 -0500 |
commit | 2094909df35db45ca7a409cc37f38d49c3191d2a (patch) | |
tree | a48f2660032c26b364fb034bc1459e7674346bba /tests/test_api.py | |
parent | 181d71c7ae537299a74291e4671bd8b896bcd55d (diff) | |
download | python-coveragepy-git-2094909df35db45ca7a409cc37f38d49c3191d2a.tar.gz |
fix: suffix=False will suppress the suffix even with multiprocessing. #989
Diffstat (limited to 'tests/test_api.py')
-rw-r--r-- | tests/test_api.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 6b065709..a76fe3b9 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1199,3 +1199,23 @@ class RelativePathTest(CoverageTest): assert files == {'foo.py', 'bar.py', os_sep('modsrc/__init__.py')} res = cov.report() assert res == 100 + + def test_combine_no_suffix_multiprocessing(self): + self.make_file(".coveragerc", """\ + [run] + branch = True + """) + cov = coverage.Coverage( + config_file=".coveragerc", + concurrency="multiprocessing", + data_suffix=False, + ) + cov.start() + cov.stop() + # The warning isn't the point of this test, but suppress it. + with pytest.warns(Warning) as warns: + cov.combine() + assert_coverage_warnings(warns, "No data was collected. (no-data-collected)") + cov.save() + self.assert_file_count(".coverage.*", 0) + self.assert_exists(".coverage") |