summaryrefslogtreecommitdiff
path: root/tests/test_concurrency.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-08-24 07:13:42 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-08-24 07:13:42 -0400
commitc4b2392dd51b7f976972afb00f01d4618c523cff (patch)
tree7c77b420d4eec7ac628393663c67c0e9bc2c66f7 /tests/test_concurrency.py
parent8a337f91e6444c027771741a56636a56389706e3 (diff)
parentdd5b0cc88ebe4528abaa7cdf0b3fd516fb1f7e01 (diff)
downloadpython-coveragepy-git-c4b2392dd51b7f976972afb00f01d4618c523cff.tar.gz
Merge branch 'nedbat/data-sqlite'
Diffstat (limited to 'tests/test_concurrency.py')
-rw-r--r--tests/test_concurrency.py7
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)