Skip to content

Commit

Permalink
Don't need to check for JSON-era bad-data messages any more
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 22, 2019
1 parent 77dc37f commit d66d496
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,7 @@ def test_combining_corrupt_data(self):
self.make_bad_data_file()
cov = coverage.Coverage()
warning_regex = (
r"(" # JSON message:
r"Couldn't read data from '.*\.coverage\.foo': "
r"CoverageException: Doesn't seem to be a coverage\.py data file"
r"|" # SQL message:
r"Couldn't use data file '.*\.coverage\.foo': file (is encrypted or )?is not a database"
r")"
)
with self.assert_warnings(cov, [warning_regex]):
cov.combine()
Expand Down
10 changes: 0 additions & 10 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,8 @@ def test_combine_parallel_data_with_a_corrupt_file(self):
self.assert_exists(".coverage")
self.assert_exists(".coverage.bad")
warning_regex = (
r"(" # JSON message:
r"Coverage.py warning: Couldn't read data from '.*\.coverage\.bad': "
r"CoverageException: Doesn't seem to be a coverage\.py data file"
r"|" # SQL message:
r"Coverage.py warning: Couldn't use data file '.*\.coverage\.bad': "
r"file (is encrypted or )?is not a database"
r")"
)
self.assertRegex(out, warning_regex)

Expand Down Expand Up @@ -168,13 +163,8 @@ def test_combine_no_usable_files(self):
for n in "12":
self.assert_exists(".coverage.bad{}".format(n))
warning_regex = (
r"(" # JSON message:
r"Coverage.py warning: Couldn't read data from '.*\.coverage\.bad{0}': "
r"CoverageException: Doesn't seem to be a coverage\.py data file"
r"|" # SQL message:
r"Coverage.py warning: Couldn't use data file '.*\.coverage.bad{0}': "
r"file (is encrypted or )?is not a database"
r")"
.format(n)
)
self.assertRegex(out, warning_regex)
Expand Down

0 comments on commit d66d496

Please sign in to comment.