CentreForDigitalHumanities / CentreForDigitalHumanities/readit-interface

pytest-xdist does not cooperate with pytest-django

Open
#491 0 comments 0 reactions 0 assignees View on GitHub
code quality wontfix
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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 https://github.com/pytest-dev/pytest-xdist/issues/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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.