From 2094909df35db45ca7a409cc37f38d49c3191d2a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 18 Nov 2021 06:16:55 -0500 Subject: fix: suffix=False will suppress the suffix even with multiprocessing. #989 --- tests/test_api.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/test_api.py') 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") -- cgit v1.2.1