-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CLI tests work with parallel test execution
We use pytest-xdist for parallel test execution, which means multiple worker threads fire up tests which are loosely grouped by class/module. Unfortunately, there are no guarantees around any of this, so the CLI tests, which are all in one module, may execute on different workers. We had a bad fixture layout on the CLI tests which would touch a file in the CLI directory and then unlink it after the test was done. If every test ran on the same worker this was fine - only one test would ever be accessing this path location at a time. But when the tests get split across workers bad things happen with FileNotFound and things of that nature. This change moves us off of having multiple tests creating and destroying the same file in the same file path location, instead relying on a fixed file that already exists in a static location in the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters