summaryrefslogtreecommitdiff
path: root/tests/test_oddball.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-31 16:38:02 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-31 16:38:02 -0500
commit0bcb2cb8344eb4cec24455fa421ece185eec0fac (patch)
tree4d6ed7c2be8689c39b7ac949905c4883392d3a0b /tests/test_oddball.py
parentbf73b37080c3c6deec969a555b45b70ee6727b13 (diff)
downloadpython-coveragepy-git-0bcb2cb8344eb4cec24455fa421ece185eec0fac.tar.gz
test: a sorted_lines helper
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r--tests/test_oddball.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 37216b39..2c35177b 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -12,6 +12,7 @@ import pytest
import coverage
from coverage import env
+from coverage.data import sorted_lines
from coverage.files import abs_file
from coverage.misc import import_local_file
@@ -383,8 +384,7 @@ class ExceptionTest(CoverageTest):
data = cov.get_data()
for callname in callnames:
filename = callname + ".py"
- lines = data.lines(abs_file(filename))
- clean_lines[filename] = sorted(lines)
+ clean_lines[filename] = sorted_lines(data, abs_file(filename))
assert clean_lines == lines_expected
@@ -427,7 +427,7 @@ class DoctestTest(CoverageTest):
self.start_import_stop(cov, "the_doctest")
data = cov.get_data()
assert len(data.measured_files()) == 1
- lines = data.lines(data.measured_files().pop())
+ lines = sorted_lines(data, data.measured_files().pop())
assert lines == [1, 3, 18, 19, 21, 23, 24]