summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-10-04 11:08:36 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-10-04 11:08:36 -0400
commit76aec1b04f44713ce43f3e84113d55ef58a54d21 (patch)
treecb38aacfcde8d2794462178b45edb623bf6fb1ac /tests/test_api.py
parent448eb3521b366a487b88252f8f6027ef48ef5773 (diff)
downloadpython-coveragepy-76aec1b04f44713ce43f3e84113d55ef58a54d21.tar.gz
Combining now issues warnings on unreadable files, unconditionally
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index ad32222..a7cadab 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -305,19 +305,8 @@ class ApiTest(CoverageTest):
self.make_file(".coverage.foo", """La la la, this isn't coverage data!""")
def test_combining_corrupt_data(self):
- self.make_corrupt_data_files()
- cov = coverage.Coverage()
-
- msg = r"Couldn't read data from '.*\.coverage\.foo'"
- with self.assertRaisesRegex(CoverageException, msg):
- cov.combine()
-
- # The bad file still exists.
- self.assert_exists(".coverage.foo")
-
- def test_combining_corrupt_data_while_ignoring_errors(self):
- # If you combine a corrupt data file with ignore_errors=True, then you
- # will get a warning, and the file will remain.
+ # If you combine a corrupt data file, then you will get a warning,
+ # and the file will remain.
self.make_corrupt_data_files()
cov = coverage.Coverage()
warning_regex = (
@@ -325,7 +314,7 @@ class ApiTest(CoverageTest):
r"CoverageException: Doesn't seem to be a coverage\.py data file"
)
with self.assert_warnings(cov, [warning_regex]):
- cov.combine(ignore_errors=True)
+ cov.combine()
# We got the results from code1 and code2 properly.
self.check_code1_code2(cov)