This repository was archived by the owner on Dec 8, 2022. It is now read-only.
Commit fd22da1
Leonidas Loucas
test: Move setup and teardown to a autouse fixture
Pytest docs say that setup and teardown functions run prior to fixtures,
therefore the plugin was always patching (being enabled), and strong
guards via fixture cacheing were
making it look like setup and teardown were called at the right time.
By promotoing enable_plugin to a fixture in all cases, and using a
autouse yield fixture to call setup and teardown we can make this under
our full control1 parent 27b2736 commit fd22da1
File tree
5 files changed
+59
-34
lines changed- pylint_pytest/checkers
- tests
5 files changed
+59
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 223 | | |
229 | 224 | | |
230 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | | - | |
62 | 71 | | |
63 | 72 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
| |||
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
75 | | - | |
76 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
77 | 89 | | |
78 | 90 | | |
79 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
14 | | - | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | | - | |
18 | | - | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
14 | | - | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | | - | |
18 | | - | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | | - | |
22 | | - | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | | - | |
26 | | - | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | | - | |
30 | | - | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | | - | |
15 | | - | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
0 commit comments