From 8c103625d7fa6bba5c27ca0d51a5235833136191 Mon Sep 17 00:00:00 2001 From: Herrtian <70463940+Herrtian@users.noreply.github.com> Date: Fri, 1 May 2026 17:19:41 +0200 Subject: [PATCH 1/3] Add pytest main CI smoke test --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44a7e561..506e474f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -100,6 +100,28 @@ jobs: path: coverage/coverage.* if-no-files-found: error + test-pytest-dev: + name: ubuntu - Python ${{ env.PYTHON_LATEST }} - pytest main + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 + with: + python-version: ${{ env.PYTHON_LATEST }} + - name: Install dependencies + run: | + python -VV + python -m site + python -m pip install --upgrade pip + python -m pip install --upgrade \ + ".[testing]" \ + "pytest @ git+https://github.com/pytest-dev/pytest.git" + - name: Run tests against pytest main + run: make test + lint-github-actions: name: Lint GitHub Actions permissions: From 09a6a37cdfe20f2a03870d9aa161fba8fb9ab3cd Mon Sep 17 00:00:00 2001 From: Herrtian <70463940+Herrtian@users.noreply.github.com> Date: Sat, 2 May 2026 17:21:07 +0200 Subject: [PATCH 2/3] Add local pytest dev tox env --- .github/workflows/main.yml | 8 +++----- tox.ini | 6 ++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 506e474f..d0704b05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,7 +101,7 @@ jobs: if-no-files-found: error test-pytest-dev: - name: ubuntu - Python ${{ env.PYTHON_LATEST }} - pytest main + name: ubuntu - Python latest - pytest main runs-on: ubuntu-latest continue-on-error: true steps: @@ -116,11 +116,9 @@ jobs: python -VV python -m site python -m pip install --upgrade pip - python -m pip install --upgrade \ - ".[testing]" \ - "pytest @ git+https://github.com/pytest-dev/pytest.git" + python -m pip install --upgrade tox - name: Run tests against pytest main - run: make test + run: python -m tox run -e pytest-dev lint-github-actions: name: Lint GitHub Actions diff --git a/tox.ini b/tox.ini index c37ee977..099c4edb 100644 --- a/tox.ini +++ b/tox.ini @@ -40,6 +40,12 @@ commands = make test allowlist_externals = make +[testenv:pytest-dev] +description = Run tests against pytest main +constraints = +deps = + pytest @ git+https://github.com/pytest-dev/pytest.git + [testenv:docs] allowlist_externals = git From d151e90e45821e84c1e312b04d6a0dd10ef17412 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Wed, 13 May 2026 19:16:19 +0200 Subject: [PATCH 3/3] test: Prepare tests for unhandled async fixture errors in pytest >=9.1. --- tests/modes/test_strict_mode.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/modes/test_strict_mode.py b/tests/modes/test_strict_mode.py index be4d8d99..86cc34ad 100644 --- a/tests/modes/test_strict_mode.py +++ b/tests/modes/test_strict_mode.py @@ -2,6 +2,7 @@ from textwrap import dedent +import pytest from pytest import Pytester, version_tuple as pytest_version @@ -82,6 +83,10 @@ async def test_anything(): result.stdout.fnmatch_lines(["*async def functions are not natively supported*"]) +@pytest.mark.skipif( + pytest_version >= (9, 1, 0), + reason="pytest >=9.1 converts unhandled async fixtures to errors", +) def test_strict_mode_ignores_unmarked_fixture(pytester: Pytester): pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function") pytester.makepyfile(dedent("""\ @@ -109,6 +114,10 @@ async def test_anything(any_fixture): ) +@pytest.mark.skipif( + pytest_version >= (9, 1, 0), + reason="pytest >=9.1 converts unhandled async fixtures to errors", +) def test_strict_mode_marked_test_unmarked_fixture_warning(pytester: Pytester): pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function") pytester.makepyfile(dedent("""\ @@ -152,6 +161,10 @@ async def test_anything(any_fixture): # autouse is not handled in any special way currently +@pytest.mark.skipif( + pytest_version >= (9, 1, 0), + reason="pytest >=9.1 converts unhandled async fixtures to errors", +) def test_strict_mode_marked_test_unmarked_autouse_fixture_warning(pytester: Pytester): pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function") pytester.makepyfile(dedent("""\