Skip to content

Commit

Permalink
Ensure advertised pytest 7.4 compatibility
Browse files Browse the repository at this point in the history
Fixes #181
  • Loading branch information
nicoddemus committed Dec 26, 2024
1 parent f7c4cd0 commit 47a6589
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
tox_env: ["py"]
include:
- os: "ubuntu-latest"
python: "3.9"
tox_env: "pytest7-py"

steps:
- uses: actions/checkout@v4
Expand All @@ -56,4 +61,4 @@ jobs:
- name: Test
shell: bash
run: |
tox run -e py --installpkg `find dist/*.tar.gz`
tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
6 changes: 3 additions & 3 deletions tests/test_subtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def test_foo(self):
["collected 1 item", "* 3 skipped, 1 passed in *"]
)

@pytest.mark.parametrize("runner", ["unittest", "pytest-normal", "pytest-xdist"])
@pytest.mark.parametrize("runner", ["pytest-normal"])
def test_skip_with_failure_and_non_subskip(
self,
pytester: pytest.Pytester,
Expand Down Expand Up @@ -491,8 +491,8 @@ def test_foo(self):
r".* 6 failed, 5 skipped in .*",
]
)
# check with `--no-fold-skipped` (which gives the correct information)
if sys.version_info >= (3, 10):
# Check with `--no-fold-skipped` (which gives the correct information).
if sys.version_info >= (3, 10) and pytest.version_tuple[:2] >= (8, 3):
result = pytester.runpytest(p, "-v", "--no-fold-skipped", "-rsf")
result.stdout.re_match_lines(
[
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[tox]
envlist = py39,py310,py311,py312,py313
envlist = py39,py310,py311,py312,py313,pytest7

[testenv]
deps =
pytest-xdist>=3.3.0
pytest7: pytest ~=7.4

commands =
pytest {posargs:tests}

0 comments on commit 47a6589

Please sign in to comment.