diff options
Diffstat (limited to 'tests/test_concurrency.py')
-rw-r--r-- | tests/test_concurrency.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 58529ec5..9e2d73d9 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -14,6 +14,7 @@ from flaky import flaky import coverage from coverage import env from coverage.backward import import_local_file +from coverage.data import line_counts from coverage.files import abs_file from tests.coveragetest import CoverageTest @@ -235,8 +236,8 @@ class ConcurrencyTest(CoverageTest): # Read the coverage file and see that try_it.py has all its lines # executed. - data = coverage.CoverageData() - data.read_file(".coverage") + data = coverage.CoverageData(".coverage") + data.read() # If the test fails, it's helpful to see this info: fname = abs_file("try_it.py") @@ -245,7 +246,7 @@ class ConcurrencyTest(CoverageTest): print_simple_annotation(code, linenos) lines = line_count(code) - self.assertEqual(data.line_counts()['try_it.py'], lines) + self.assertEqual(line_counts(data)['try_it.py'], lines) def test_threads(self): code = (THREAD + SUM_RANGE_Q + PRINT_SUM_RANGE).format(QLIMIT=self.QLIMIT) |