Commit b780a8c
committed
Tweak
The situation with test_tree_modifier_ordering's helper, where it
makes sense to wrap the helper itself with `@with_rw_directory`
while still deleting the temporary directory as soon as the helper
itself finishes, in order to make clear that the test itself does
not use the temporary directory that the helper used, only occurs
in one place in GitPython's tests as far as I know.
In particular, all other places where `@with_rw_directory` was
actually in use are test methods, not helper methods, and the way
the decorator would have its wrapper log on failure documented the
decorated method as a test. Mainly for that reason, I had backed
away from using `@with_rw_directory` here.
But the test code seems much easier to understand when it is used
compared to other approaches. While it also has the disadvantage of
doing a gc.collect that is unnecessary here, this is not the only
place what that is done.
This commit brings back the test_tree_modifier_ordering helper
implementation that uses `@with_rw_directory`, while also modifying
the logging logic in `@with_rw_directory` slightly, so that when
the decorated method is not named as a test, it is referred to as a
"Helper" rather than a "Test" in the failure log message.@with_rw_directory and go back to using it1 parent 0114a99 commit b780a8c
2 files changed
+32
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
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 | | - | |
| 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 | + | |
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
| |||
0 commit comments