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 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.