Skip to content

fix(test-reports): pytest --junitxml goes after the runner, not a wrapper's --with pytest - #222

Merged
calvin-archastro merged 1 commit into
mainfrom
fix/report-flags-after-wrapped-runner
Oct 30, 2026
Merged

calvin-archastro merged 1 commit into
mainfrom
fix/report-flags-after-wrapped-runner

Conversation

@calvin-archastro

Copy link
Copy Markdown
Contributor

Problem

pytest() in src/plugins/test_reports.rs located the runner as the first argv token named pytest. In uv run --quiet --no-project --with pytest -- python -m pytest -q test_main.py, that is the value of uv's --with. The code then scanned from there, hit uv's own --, and inserted --junitxml=... before it. uv received the flag and failed: error: unexpected argument '--junitxml' found. The [affected.related] wrappers config is not involved. It only affects test narrowing, and this path never sees it.

What changed

  • Skip a pytest token that is the value of --with, -w, --with-editable, --from, --package or --with-requirements. The runner is then the real pytest after --, and the flag goes at the end of the wrapped command.
  • Regression tests: the uv --with pytest -- python -m pytest command and uvx --from pytest pytest -q.
  • mise exec node@24 -- vitest run takes a different path. The JS planner does not recognise mise as a launcher and returns no plan, so no flag is added to the wrapper. A test pins that.

Testing

  • cargo test --lib test_reports: 29 passed.
  • cargo clippy --all-targets -- -D warnings and cargo fmt: clean.

Risk

Low. The change is confined to pytest runner detection, and the existing pytest cases are unchanged.

🤖 Generated with Claude Code

@calvin-archastro
calvin-archastro requested a review from a team October 29, 2026 23:57
@calvin-archastro

calvin-archastro commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

ArchDev is watching this pull request. State: settled (cycle 2 of 2 for head a423e03).

when trigger decision result
2026-10-30T00:09:07.125Z failed ci enqueue job_c51fa7452c4852adc148bc11 published c909a2c
2026-10-30T00:23:18.357Z verify head enqueue job_8f65167454ad4c39eafe5650 no change

Paused by the no-autofix label or a draft; never resolves reviewer threads. Jobs: job_c51fa7452c4852adc148bc11, job_8f65167454ad4c39eafe5650.

…a wrapper's --with pytest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@calvin-archastro
calvin-archastro force-pushed the fix/report-flags-after-wrapped-runner branch from c909a2c to a423e03 Compare October 30, 2026 00:38
@calvin-archastro
calvin-archastro merged commit c3291a4 into main Oct 30, 2026
13 checks passed
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.

1 participant