Adds xdist and cleans up some test namespace collisions #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
--loadfileforces 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 usingxdist-groupsto 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.