Skip to content

Conversation

@boyanpenkov
Copy link
Owner

I had wanted to use https://pypi.org/project/pytest-xdist/ to run tests in parallel, and this PR does that.

This exposed a number of race conditions in the original test suite, which I cleaned up by forcing them to run in series -- using --loadfile forces them to run in series by file, so I placed the race-conditiony ones in a separate file: test_serial.py, so the speedup for now is not actually the worker-count. The next step for improving this is using xdist-groups to specify manually which tests should run together.

More importantly, since I had to run though five files worth of tests manually, I discovered that multiple tests were named the same, and consequentially were not being run. I fixed this, and the gross test count went up from 154 to 157 for free essentially.

Note that this was only tested on a codebase that assumes perrette#79 went in.

…lizes tests that have race conditions, and renames tests to avoid namespace collisions
@boyanpenkov
Copy link
Owner Author

Just an observation for now -- this fails if you run with tox --parallel to try to do all the envs at the same time, for the same fundamental reason -- trying to write to the same bibtex files in the same places.

@boyanpenkov
Copy link
Owner Author

@perrette Please note this as well -- the existing test config, conda or not, had some duplicate tests and namespace collisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants