Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--looponfail consider junitxml output a change #88

Open
Daenyth opened this issue Sep 15, 2016 · 3 comments
Open

--looponfail consider junitxml output a change #88

Daenyth opened this issue Sep 15, 2016 · 3 comments
Labels

Comments

@Daenyth
Copy link

Daenyth commented Sep 15, 2016

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.

@RonnyPfannschmidt RonnyPfannschmidt changed the title --looponfail runs tests forever when using --junitxml --looponfail consider junitxml output a change Sep 15, 2016
@tomasaschan
Copy link

I'm still seeing this on the most recent pytest-xdist - 4 years later... 😕

@nicoddemus
Copy link
Member

--looponfail would require a new option to ignore some glob files to solve this I think.

A workaround is to use looponfailroots in your inifile to only watch the directories with your source code, instead of the current working directory.

@raqbit
Copy link

raqbit commented Jul 6, 2021

The same issue occurs when pytest-cov or coverage is used to generate an HTML coverage report.
I think the best fix would indeed be a command line parameter to ignore a glob of files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants