@@ -12,8 +12,7 @@ def test_success():
12
12
'''
13
13
)
14
14
testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true' )
15
- testdir ._method = 'subprocess'
16
- result = testdir .runpytest ()
15
+ result = testdir .runpytest_subprocess ()
17
16
result .stdout .no_fnmatch_line (
18
17
'::error file=test_annotation_succeed_no_output.py*' ,
19
18
)
@@ -29,8 +28,7 @@ def test_fail():
29
28
'''
30
29
)
31
30
testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true' )
32
- testdir ._method = 'subprocess'
33
- result = testdir .runpytest ()
31
+ result = testdir .runpytest_subprocess ()
34
32
result .stdout .fnmatch_lines ([
35
33
'::error file=test_annotation_fail.py,line=4::def test_fail():*' ,
36
34
])
@@ -47,8 +45,7 @@ def test_fail():
47
45
'''
48
46
)
49
47
testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true' )
50
- testdir ._method = 'subprocess'
51
- result = testdir .runpytest ()
48
+ result = testdir .runpytest_subprocess ()
52
49
result .stdout .fnmatch_lines ([
53
50
'::error file=test_annotation_exception.py,line=4::def test_fail():*' ,
54
51
])
@@ -64,8 +61,7 @@ def test_fail():
64
61
'''
65
62
)
66
63
testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , '' )
67
- testdir ._method = 'subprocess'
68
- result = testdir .runpytest ()
64
+ result = testdir .runpytest_subprocess ()
69
65
result .stdout .no_fnmatch_line (
70
66
'::error file=test_annotation_fail_disabled_outside_workflow.py*' ,
71
67
)
0 commit comments