pytest-dev / pytest-dev/pytest-xdist

--looponfail consider junitxml output a change

Open
#88 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.9k
Forks
287
Avg merge
9h 30m
Merged PRs (30d)
2

Description

Running pytest --looponfail --junitxml=report.xml tests/ results in the following:

  • Runs the tests
  • Generates the test report file
  • File watcher says # MODIFIED path/to/report.xml
  • Runs the tests
  • Generates a new test report file...

I can invoke it without the report, that's fine, but it's annoying because I have the report argument in my tox.ini, so using tox -- --looponfail shows this behavior.

Given that the junitxml argument knows the file path, it seems like a potential solution here is to explicitly skip changes to that file.

It's likely there's a similar issue for html reports and coverage.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the --looponfail file-watcher entry point and the junitxml path configured in tox.ini. Trace how report changes trigger another run, then verify that the configured report is ignored while genuine test-file changes still cause reruns; the issue also notes possible html and coverage reports for broader consideration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.