Skip to content

Commit 622bb3e

Browse files
committed
Fix test for Windows
1 parent 237a959 commit 622bb3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_pytest_cov.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1996,8 +1996,10 @@ def test_contexts(testdir, opts):
19961996
data = coverage.CoverageData(".coverage")
19971997
data.read()
19981998
assert data.measured_contexts() == set(EXPECTED_CONTEXTS)
1999-
test_context_path = os.path.abspath("test_contexts.py")
2000-
assert data.measured_files() == {test_context_path}
1999+
measured = data.measured_files()
2000+
assert len(measured) == 1
2001+
test_context_path = list(measured)[0]
2002+
assert test_context_path.lower() == os.path.abspath("test_contexts.py").lower()
20012003

20022004
line_data = find_labels(contextful_tests, r"[crst]\d+(?:-\d+)?")
20032005
for context, label in EXPECTED_CONTEXTS.items():

0 commit comments

Comments
 (0)