File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ def test_08(expensive_data):
72
72
73
73
@pytest .fixture (params = [1 , 2 , 3 ])
74
74
def parametrized_number (request ):
75
- return request .param # x9 -1 x9 -2 x9 -3
75
+ return request .param # s9 -1 s9 -2 s9 -3
76
76
77
77
78
78
def test_09 (parametrized_number ):
79
- assert parametrized_number > 0 # x9 -1 x9 -2 x9 -3
79
+ assert parametrized_number > 0 # r9 -1 r9 -2 r9 -3
80
80
81
81
82
82
def test_10 ():
Original file line number Diff line number Diff line change @@ -1942,7 +1942,7 @@ def find_labels(text, pattern):
1942
1942
return all_labels
1943
1943
1944
1944
1945
- # The contexts in contextful.py
1945
+ # The contexts and their labels in contextful.py
1946
1946
EXPECTED_CONTEXTS = {
1947
1947
'' : 'c0' ,
1948
1948
'test_contexts.py::test_01|run' : 'r1' ,
@@ -1995,7 +1995,9 @@ def test_contexts(testdir, opts):
1995
1995
for context , label in EXPECTED_CONTEXTS .items ():
1996
1996
if context == '' :
1997
1997
continue
1998
- assert data .lines (test_context_path , contexts = [context ]) == line_data [label ], "Wrong lines for context {!r}" .format (context )
1998
+ context_pattern = re .sub (r"[\[\|]" , r"[\g<0>]" , context )
1999
+ actual = data .lines (test_context_path , contexts = [context_pattern ])
2000
+ assert line_data [label ] == actual , "Wrong lines for context {!r}" .format (context )
1999
2001
2000
2002
2001
2003
@pytest .mark .skipif ("coverage.version_info >= (5, 0)" )
You can’t perform that action at this time.
0 commit comments