File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 32
32
- name : Install dependencies
33
33
run : |
34
34
python -m pip install --upgrade pip
35
+ pip install -r requirements.txt
35
36
pip install pytest==${{ matrix.pytest-version }}
36
37
37
38
- name : Install itself
Original file line number Diff line number Diff line change 1
1
pytest_plugins = 'pytester'
2
2
import pytest
3
+ from packaging import version
3
4
4
5
def test_annotation_succeed_no_output (testdir ):
5
6
testdir .makepyfile (
@@ -13,9 +14,15 @@ def test_success():
13
14
)
14
15
testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true' )
15
16
result = testdir .runpytest_subprocess ()
16
- result .stdout .no_fnmatch_line (
17
- '::error file=test_annotation_succeed_no_output.py*' ,
18
- )
17
+
18
+ # no_fnmatch_line() is added to testdir on pytest 5.3.0
19
+ # https://docs.pytest.org/en/stable/changelog.html#pytest-5-3-0-2019-11-19
20
+ if version .parse (pytest .__version__ ) >= version .parse ('5.3.0' ):
21
+ result .stdout .no_fnmatch_line (
22
+ '::error file=test_annotation_succeed_no_output.py*' ,
23
+ )
24
+ else :
25
+ assert '::error file=test_annotation_succeed_no_output.py' not in result .stdout .str ()
19
26
20
27
def test_annotation_fail (testdir ):
21
28
testdir .makepyfile (
You can’t perform that action at this time.
0 commit comments