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

pytest-xdist does not cooperate with pytest-django #491

Open
jgonggrijp opened this issue Jul 8, 2021 · 0 comments
Open

pytest-xdist does not cooperate with pytest-django #491

jgonggrijp opened this issue Jul 8, 2021 · 0 comments
Labels
code quality Adressing this improves maintainability wontfix This will not be worked on

Comments

@jgonggrijp
Copy link
Member

I previously spoke to @JeltevanBoheemen because I was running into massive backend unittest errors. At first, I thought that #481 solved the issue. However, today, the massive errors started appearing again.

After some more experimentation, I realized that the difference between 20 errors or zero errors purely depended on whether the --looponfail option was passed to pytest. The --looponfail option is provided by the pytest-xdist package; the errors appear when it is enabled. From pytest-dev/pytest-xdist#359, I learned that this is probably due to a "massive structural failure of pytest config initialization", causing pytest-django to load the wrong settings when pytest-xdist is involved.

Frankly, this is out of our control. The best we can do for now is to avoid pytest --looponfail as well as yarn watch-test-back and to run the backend unittests only manually instead using yarn test-back. I suggest leaving this open for documentation.

@jgonggrijp jgonggrijp added wontfix This will not be worked on code quality Adressing this improves maintainability labels Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Adressing this improves maintainability wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant