[Pytest-commit] Issue #455: Using xdist with -f option runs tests twice on a detected test source code change (hpk42/pytest)

Jurko Gospodnetić issues-reply at bitbucket.org
Sun Feb 9 13:51:07 CET 2014


New issue 455: Using xdist with -f option runs tests twice on a detected test source code change
https://bitbucket.org/hpk42/pytest/issue/455/using-xdist-with-f-option-runs-tests-twice

Jurko Gospodnetić:

When using the xdist plugin and with its ```-f``` option to wait for source changes and automatically rerun the tests when they are detected, the tests seem to be rerun twice for each test code change.

Here's what happens:

1. you change a test file, e.g. ```test_me.py```
2. xdist detects the change and reruns the tests
3. while rerunning the tests, pytest compiles the test file and updates ```test_me.pyc```
4. xdist detects the ```test_me.pyc``` change and reruns the tests again

Seems like a typical usage scenario which should be handled by xdist. It should know that it was the one who created the ```test_me.pyc``` file and used that same file when running the previous test run.

Hope this helps.

Best regards,
  Jurko Gospodnetić




More information about the pytest-commit mailing list