This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make logging tests deterministic (#424)
The current iteration of the tests are constantly racing against each other because they touch the same file paths. Tests are run in parallel for speed reasons and there is no guarantee that 2 test methods aren't running at the same time. This commit fixes these issues by using tempfiles for the places the logger writes to disk. This way there is never going to be 2 files being touched by different tests at the same time. The next step here would to replace all the file usage with mocks so we don't actually write to disk. There is not really a reason to actually write out to disk and it makes the tests more complicated because we have to synchronizing the state of the FS or create a blank workspace for each test. But this isn't done here because it would require a slightly larger refactor of the tests. Co-authored-by: Eli Arbel <[email protected]>
- Loading branch information
Showing
4 changed files
with
69 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ jupyter | |
jupyter-sphinx | ||
reno | ||
matplotlib | ||
pyfakefs |
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