Skip to content

Commit aa3f96b

Browse files
authored
Ensure advertised pytest 7.4 compatibility (#182)
Fixes #181
1 parent f7c4cd0 commit aa3f96b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/test.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
matrix:
3434
os: ["ubuntu-latest", "windows-latest"]
3535
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
36+
tox_env: ["py"]
37+
include:
38+
- os: "ubuntu-latest"
39+
python: "3.9"
40+
tox_env: "pytest7-py"
3641

3742
steps:
3843
- uses: actions/checkout@v4
@@ -56,4 +61,4 @@ jobs:
5661
- name: Test
5762
shell: bash
5863
run: |
59-
tox run -e py --installpkg `find dist/*.tar.gz`
64+
tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`

tests/test_subtests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ def test_foo(self):
491491
r".* 6 failed, 5 skipped in .*",
492492
]
493493
)
494-
# check with `--no-fold-skipped` (which gives the correct information)
495-
if sys.version_info >= (3, 10):
494+
# Check with `--no-fold-skipped` (which gives the correct information).
495+
if sys.version_info >= (3, 10) and pytest.version_tuple[:2] >= (8, 3):
496496
result = pytester.runpytest(p, "-v", "--no-fold-skipped", "-rsf")
497497
result.stdout.re_match_lines(
498498
[

tox.ini

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[tox]
2-
envlist = py39,py310,py311,py312,py313
2+
envlist = py39,py310,py311,py312,py313,pytest7
33

44
[testenv]
55
deps =
66
pytest-xdist>=3.3.0
7+
pytest7: pytest ~=7.4
78

89
commands =
910
pytest {posargs:tests}

0 commit comments

Comments
 (0)