summaryrefslogtreecommitdiff
path: root/tests/test_data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-10-16 20:38:30 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-10-16 20:38:41 -0400
commit745d8f20047ee63d8e8378ab77a3488951e97b0e (patch)
treeca6069aa8e19e49ec3956e2954f6e5ac0d6a8cce /tests/test_data.py
parent9307f55b72dbe47742655bced4e0ae05914c4664 (diff)
downloadpython-coveragepy-git-745d8f20047ee63d8e8378ab77a3488951e97b0e.tar.gz
A test for 'no such table: meta' as in #716.
Diffstat (limited to 'tests/test_data.py')
-rw-r--r--tests/test_data.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_data.py b/tests/test_data.py
index 60fd341e..bda73810 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -831,3 +831,15 @@ class CoverageDataFilesTest(DataTestHelpers, CoverageTest):
msg = "Couldn't combine from non-existent path 'xyzzy'"
with self.assertRaisesRegex(CoverageException, msg):
combine_parallel_data(covdata, data_paths=['xyzzy'])
+
+ def test_interleaved_erasing_bug716(self):
+ # pytest-cov could produce this scenario. #716
+ covdata1 = CoverageData()
+ covdata2 = CoverageData()
+ # this used to create the .coverage database file..
+ covdata2.set_context("")
+ # then this would erase it all..
+ covdata1.erase()
+ # then this would try to use tables that no longer exist.
+ # "no such table: meta"
+ covdata2.add_lines(LINES_1)