Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit0114a99
committed
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 wheresome read-only files otherwise cause TemporaryDirectory's cleanupto raise PermissionError on Windows in Python 3.7.This avoids the gc.collect that is known not to be necessary inthis speciifc situation, as well as the problem that, if operatingin the temporary directory did fail, then name of the helper wouldbe logged as the name of the test where the failure occurred. Butthis has the disadvantage of making the helper more complex andharder to understand. So this may not be the best approach either.1 parent90cf4d7 commit0114a99
1 file changed
+35
-30
lines changedLines changed: 35 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 |
| - | |
13 |
| - | |
| 13 | + | |
| 14 | + | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
| |||
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
45 |
| - | |
46 |
| - | |
| 46 | + | |
| 47 | + | |
47 | 48 |
| |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 |
| |
75 | 80 |
| |
76 | 81 |
| |
|
0 commit comments
Comments
(0)