-
-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use more ligtweight approach to guarantee deletion
This changes from `@with_rw_directory` back to TemporaryDirectory, but calls git.util.rmtree on the repsitory's .git directory where some read-only files otherwise cause TemporaryDirectory's cleanup to raise PermissionError on Windows in Python 3.7. This avoids the gc.collect that is known not to be necessary in this speciifc situation, as well as the problem that, if operating in the temporary directory did fail, then name of the helper would be logged as the name of the test where the failure occurred. But this has the disadvantage of making the helper more complex and harder to understand. So this may not be the best approach either.
- Loading branch information
1 parent
90cf4d7
commit 0114a99
Showing
1 changed file
with
35 additions
and
30 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