Skip to content

[TE-5274] Add pytest 9.x CI matrix entry for subtest integration tests#95

Merged
gchan merged 1 commit intomainfrom
te-5274-pytest9-ci-matrix
Mar 17, 2026
Merged

[TE-5274] Add pytest 9.x CI matrix entry for subtest integration tests#95
gchan merged 1 commit intomainfrom
te-5274-pytest9-ci-matrix

Conversation

@gchan
Copy link
Contributor

@gchan gchan commented Mar 17, 2026

Description

PR #94 added subtest handling with 5 integration tests in test_integration_subtests.py. Those tests need pytest >= 9.0 (which introduced built-in SubtestReport), but uv.lock pins pytest to 8.4.1. All 5 are unconditionally skipped in CI today, so the subtest code path is never exercised end-to-end.

We can't bump the lockfile to pytest 9 across the board because pytest 9.0 dropped Python 3.9 support and the collector still targets 3.9.

This adds a sixth CI matrix entry (Python 3.13 + pytest 9) using uv run --with 'pytest>=9'. The --with flag is important here: a plain uv pip install override gets silently reverted when uv run syncs the environment back to uv.lock before execution. --with creates an ephemeral overlay that persists through the run, including subprocesses spawned via sys.executable (which is how the integration tests invoke pytest).

The existing 5 matrix entries are untouched and keep testing against pytest 8.4.1 from the lockfile.

Context

Related to TE-5274 and #94 (subtest handling).

Changes

  • Add uv-run-flags matrix dimension with a pytest>=9 include entry for Python 3.13
  • Change the "Run tests" step to uv run ${{ matrix.uv-run-flags }} pytest

Verification

The workflow should show 6 pytest matrix entries instead of 5. The new entry (Python 3.13 + pytest 9.x) should run the 5 integration tests that are skipped everywhere else. AI assisted.

Deployment

Low risk. CI-only change -- no library or test code modified.

Rollback

Yes

@gchan gchan requested a review from a team March 17, 2026 00:13
@gchan gchan marked this pull request as draft March 17, 2026 00:18
@gchan
Copy link
Contributor Author

gchan commented Mar 17, 2026

@gchan
Copy link
Contributor Author

gchan commented Mar 17, 2026

@gchan gchan marked this pull request as ready for review March 17, 2026 00:24
Add a sixth matrix entry (Python 3.13 + pytest 9) so the 5 integration
tests in test_integration_subtests.py are actually exercised in CI.
Those tests require pytest >= 9.0 for built-in SubtestReport support,
but uv.lock pins pytest to 8.4.1 (pytest 9 dropped Python 3.9).

Uses uv run --with 'pytest>=9' rather than uv pip install because
uv run syncs the environment to uv.lock before execution, which would
silently revert a pip-installed override. The --with flag creates an
ephemeral overlay that persists through the run, including subprocesses
spawned via sys.executable.
@gchan gchan force-pushed the te-5274-pytest9-ci-matrix branch from 63636e5 to 1b794f9 Compare March 17, 2026 00:24
@gchan gchan enabled auto-merge March 17, 2026 00:32
@gchan gchan merged commit bca72b5 into main Mar 17, 2026
11 checks passed
@gchan gchan deleted the te-5274-pytest9-ci-matrix branch March 17, 2026 00:53
@gchan gchan mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants