From 745d8f20047ee63d8e8378ab77a3488951e97b0e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 16 Oct 2018 20:38:30 -0400 Subject: A test for 'no such table: meta' as in #716. --- tests/test_data.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/test_data.py') 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) -- cgit v1.2.1