summaryrefslogtreecommitdiff
path: root/tests/test_concurrency.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_concurrency.py')
-rw-r--r--tests/test_concurrency.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py
index 93809dff..f6af0e8a 100644
--- a/tests/test_concurrency.py
+++ b/tests/test_concurrency.py
@@ -1,11 +1,13 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
"""Tests for concurrency libraries."""
-import os
-import os.path
import threading
import coverage
from coverage import env
+from coverage.files import abs_file
from tests.coveragetest import CoverageTest
@@ -148,13 +150,13 @@ class ConcurrencyTest(CoverageTest):
data.read_file(".coverage")
# If the test fails, it's helpful to see this info:
- fname = os.path.abspath("try_it.py")
- linenos = data.executed_lines(fname).keys()
+ fname = abs_file("try_it.py")
+ linenos = data.lines(fname)
print("{0}: {1}".format(len(linenos), linenos))
print_simple_annotation(code, linenos)
lines = line_count(code)
- self.assertEqual(data.summary()['try_it.py'], lines)
+ self.assertEqual(data.line_counts()['try_it.py'], lines)
else:
expected_out = (
"Can't support concurrency=%s with PyTracer, "