Skip to content

Commit ca304ba

Browse files
committed
set GITHUB_ACTIONS env variable in tests / run tests with subprocess
1 parent 9fab220 commit ca304ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def test_success():
1111
assert 1
1212
'''
1313
)
14+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
15+
testdir._method = 'subprocess'
1416
result = testdir.runpytest()
1517
result.stdout.no_fnmatch_line(
1618
'::error file=test_annotation_succeed_no_output.py*',
@@ -26,6 +28,8 @@ def test_fail():
2628
assert 0
2729
'''
2830
)
31+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
32+
testdir._method = 'subprocess'
2933
result = testdir.runpytest()
3034
result.stdout.fnmatch_lines([
3135
'::error file=test_annotation_fail.py,line=4::def test_fail():*',
@@ -42,6 +46,8 @@ def test_fail():
4246
assert 1
4347
'''
4448
)
49+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
50+
testdir._method = 'subprocess'
4551
result = testdir.runpytest()
4652
result.stdout.fnmatch_lines([
4753
'::error file=test_annotation_exception.py,line=4::def test_fail():*',

0 commit comments

Comments
 (0)