@@ -33,12 +33,12 @@ def test_e():
33
33
""" )
34
34
result = ctestdir .runpytest ("--verbose" )
35
35
result .assert_outcomes (passed = 2 , skipped = 2 , failed = 1 )
36
- result .stdout .fnmatch_lines ( """
36
+ result .stdout .re_match_lines ( r """
37
37
test_scope_module.py::test_a FAILED
38
38
test_scope_module.py::test_b PASSED
39
- test_scope_module.py::test_c SKIPPED
39
+ test_scope_module.py::test_c SKIPPED(?:\s+\(.*\))?
40
40
test_scope_module.py::test_d PASSED
41
- test_scope_module.py::test_e SKIPPED
41
+ test_scope_module.py::test_e SKIPPED(?:\s+\(.*\))?
42
42
""" )
43
43
44
44
def test_scope_session (ctestdir ):
@@ -102,14 +102,14 @@ def test_h():
102
102
""" )
103
103
result = ctestdir .runpytest ("--verbose" )
104
104
result .assert_outcomes (passed = 6 , skipped = 1 , failed = 2 )
105
- result .stdout .fnmatch_lines ( """
105
+ result .stdout .re_match_lines ( r """
106
106
test_scope_session_01.py::test_a PASSED
107
107
test_scope_session_01.py::test_b FAILED
108
108
test_scope_session_01.py::test_c PASSED
109
109
test_scope_session_01.py::TestClass::test_b PASSED
110
110
test_scope_session_02.py::test_a FAILED
111
111
test_scope_session_02.py::test_e PASSED
112
- test_scope_session_02.py::test_f SKIPPED
112
+ test_scope_session_02.py::test_f SKIPPED(?:\s+\(.*\))?
113
113
test_scope_session_02.py::test_g PASSED
114
114
test_scope_session_02.py::test_h PASSED
115
115
""" )
@@ -174,14 +174,14 @@ def test_h():
174
174
ctestdir .makepyfile (** srcs )
175
175
result = ctestdir .runpytest ("--verbose" )
176
176
result .assert_outcomes (passed = 4 , skipped = 2 , failed = 1 )
177
- result .stdout .fnmatch_lines ( """
177
+ result .stdout .re_match_lines ( r """
178
178
test_scope_package_a/test_01.py::test_a PASSED
179
179
test_scope_package_b/test_02.py::test_c PASSED
180
180
test_scope_package_b/test_02.py::test_d FAILED
181
181
test_scope_package_b/test_03.py::test_e PASSED
182
- test_scope_package_b/test_03.py::test_f SKIPPED
182
+ test_scope_package_b/test_03.py::test_f SKIPPED(?:\s+\(.*\))?
183
183
test_scope_package_b/test_03.py::test_g PASSED
184
- test_scope_package_b/test_03.py::test_h SKIPPED
184
+ test_scope_package_b/test_03.py::test_h SKIPPED(?:\s+\(.*\))?
185
185
""" )
186
186
187
187
def test_scope_class (ctestdir ):
@@ -236,17 +236,17 @@ def test_h(self):
236
236
""" )
237
237
result = ctestdir .runpytest ("--verbose" )
238
238
result .assert_outcomes (passed = 5 , skipped = 3 , failed = 2 )
239
- result .stdout .fnmatch_lines ( """
239
+ result .stdout .re_match_lines ( r """
240
240
test_scope_class.py::test_a FAILED
241
241
test_scope_class.py::test_b PASSED
242
242
test_scope_class.py::TestClass1::test_c PASSED
243
243
test_scope_class.py::TestClass2::test_a PASSED
244
244
test_scope_class.py::TestClass2::test_b FAILED
245
- test_scope_class.py::TestClass2::test_d SKIPPED
245
+ test_scope_class.py::TestClass2::test_d SKIPPED(?:\s+\(.*\))?
246
246
test_scope_class.py::TestClass2::test_e PASSED
247
247
test_scope_class.py::TestClass2::test_f PASSED
248
- test_scope_class.py::TestClass2::test_g SKIPPED
249
- test_scope_class.py::TestClass2::test_h SKIPPED
248
+ test_scope_class.py::TestClass2::test_g SKIPPED(?:\s+\(.*\))?
249
+ test_scope_class.py::TestClass2::test_h SKIPPED(?:\s+\(.*\))?
250
250
""" )
251
251
252
252
def test_scope_nodeid (ctestdir ):
@@ -360,21 +360,21 @@ def test_o(self):
360
360
""" )
361
361
result = ctestdir .runpytest ("--verbose" )
362
362
result .assert_outcomes (passed = 7 , skipped = 8 , failed = 0 )
363
- result .stdout .fnmatch_lines ( """
363
+ result .stdout .re_match_lines ( r """
364
364
test_scope_nodeid.py::test_a PASSED
365
365
test_scope_nodeid.py::test_b PASSED
366
- test_scope_nodeid.py::test_c SKIPPED
367
- test_scope_nodeid.py::test_d SKIPPED
366
+ test_scope_nodeid.py::test_c SKIPPED(?:\s+\(.*\))?
367
+ test_scope_nodeid.py::test_d SKIPPED(?:\s+\(.*\))?
368
368
test_scope_nodeid.py::test_e PASSED
369
369
test_scope_nodeid.py::TestClass::test_f PASSED
370
370
test_scope_nodeid.py::TestClass::test_g PASSED
371
- test_scope_nodeid.py::TestClass::test_h SKIPPED
372
- test_scope_nodeid.py::TestClass::test_i SKIPPED
373
- test_scope_nodeid.py::TestClass::test_j SKIPPED
371
+ test_scope_nodeid.py::TestClass::test_h SKIPPED(?:\s+\(.*\))?
372
+ test_scope_nodeid.py::TestClass::test_i SKIPPED(?:\s+\(.*\))?
373
+ test_scope_nodeid.py::TestClass::test_j SKIPPED(?:\s+\(.*\))?
374
374
test_scope_nodeid.py::TestClass::test_k PASSED
375
- test_scope_nodeid.py::TestClass::test_l SKIPPED
376
- test_scope_nodeid.py::TestClass::test_m SKIPPED
377
- test_scope_nodeid.py::TestClass::test_n SKIPPED
375
+ test_scope_nodeid.py::TestClass::test_l SKIPPED(?:\s+\(.*\))?
376
+ test_scope_nodeid.py::TestClass::test_m SKIPPED(?:\s+\(.*\))?
377
+ test_scope_nodeid.py::TestClass::test_n SKIPPED(?:\s+\(.*\))?
378
378
test_scope_nodeid.py::TestClass::test_o PASSED
379
379
""" )
380
380
@@ -467,19 +467,19 @@ def test_l(self):
467
467
""" )
468
468
result = ctestdir .runpytest ("--verbose" )
469
469
result .assert_outcomes (passed = 7 , skipped = 5 , failed = 0 )
470
- result .stdout .fnmatch_lines ( """
470
+ result .stdout .re_match_lines ( r """
471
471
test_scope_named.py::test_a PASSED
472
472
test_scope_named.py::test_b PASSED
473
- test_scope_named.py::test_c SKIPPED
473
+ test_scope_named.py::test_c SKIPPED(?:\s+\(.*\))?
474
474
test_scope_named.py::test_d PASSED
475
- test_scope_named.py::test_e SKIPPED
475
+ test_scope_named.py::test_e SKIPPED(?:\s+\(.*\))?
476
476
test_scope_named.py::TestClass::test_f PASSED
477
477
test_scope_named.py::TestClass::test_g PASSED
478
- test_scope_named.py::TestClass::test_h SKIPPED
478
+ test_scope_named.py::TestClass::test_h SKIPPED(?:\s+\(.*\))?
479
479
test_scope_named.py::TestClass::test_i PASSED
480
- test_scope_named.py::TestClass::test_j SKIPPED
480
+ test_scope_named.py::TestClass::test_j SKIPPED(?:\s+\(.*\))?
481
481
test_scope_named.py::TestClass::test_k PASSED
482
- test_scope_named.py::TestClass::test_l SKIPPED
482
+ test_scope_named.py::TestClass::test_l SKIPPED(?:\s+\(.*\))?
483
483
""" )
484
484
485
485
def test_scope_dependsfunc (ctestdir ):
@@ -578,21 +578,21 @@ def test_d(self, request):
578
578
""" )
579
579
result = ctestdir .runpytest ("--verbose" )
580
580
result .assert_outcomes (passed = 10 , skipped = 3 , failed = 3 )
581
- result .stdout .fnmatch_lines ( """
581
+ result .stdout .re_match_lines ( r """
582
582
test_scope_dependsfunc_01.py::test_a PASSED
583
583
test_scope_dependsfunc_01.py::test_b FAILED
584
584
test_scope_dependsfunc_01.py::test_c PASSED
585
585
test_scope_dependsfunc_01.py::TestClass::test_b PASSED
586
586
test_scope_dependsfunc_02.py::test_a FAILED
587
587
test_scope_dependsfunc_02.py::test_b PASSED
588
588
test_scope_dependsfunc_02.py::test_e PASSED
589
- test_scope_dependsfunc_02.py::test_f SKIPPED
589
+ test_scope_dependsfunc_02.py::test_f SKIPPED(?:\s+\(.*\))?
590
590
test_scope_dependsfunc_02.py::test_g PASSED
591
591
test_scope_dependsfunc_02.py::test_h PASSED
592
- test_scope_dependsfunc_02.py::test_i SKIPPED
592
+ test_scope_dependsfunc_02.py::test_i SKIPPED(?:\s+\(.*\))?
593
593
test_scope_dependsfunc_02.py::test_j PASSED
594
594
test_scope_dependsfunc_02.py::TestClass::test_a PASSED
595
595
test_scope_dependsfunc_02.py::TestClass::test_b FAILED
596
596
test_scope_dependsfunc_02.py::TestClass::test_c PASSED
597
- test_scope_dependsfunc_02.py::TestClass::test_d SKIPPED
597
+ test_scope_dependsfunc_02.py::TestClass::test_d SKIPPED(?:\s+\(.*\))?
598
598
""" )
0 commit comments