Skip to content

Commit 745d8f2

Browse files
committed
A test for 'no such table: meta' as in #716.
1 parent 9307f55 commit 745d8f2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_data.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,3 +831,15 @@ def test_combining_from_nonexistent_directories(self):
831831
msg = "Couldn't combine from non-existent path 'xyzzy'"
832832
with self.assertRaisesRegex(CoverageException, msg):
833833
combine_parallel_data(covdata, data_paths=['xyzzy'])
834+
835+
def test_interleaved_erasing_bug716(self):
836+
# pytest-cov could produce this scenario. #716
837+
covdata1 = CoverageData()
838+
covdata2 = CoverageData()
839+
# this used to create the .coverage database file..
840+
covdata2.set_context("")
841+
# then this would erase it all..
842+
covdata1.erase()
843+
# then this would try to use tables that no longer exist.
844+
# "no such table: meta"
845+
covdata2.add_lines(LINES_1)

0 commit comments

Comments
 (0)