Commit 67544a4
committed
fix(lastgenre): Reset plugin config in fixtured tests
Fixes a bug in the lastgenre, where test state bled into the following fixtures.
Each plugin has a view to the global persisted beets.config field. As a result,
variables that aren't explicitly overwritten are persisted in that global config view.
This commit exposes the default config as a static method and uses that default
config to reset the state in between fixture calls.
There were 5 tests that depended on count: 10 being set on previous test fixtures,
which I adjusted accordingly.1 parent dcef1f4 commit 67544a4
File tree
2 files changed
+24
-17
lines changed- beetsplug/lastgenre
- test/plugins
2 files changed
+24
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 103 | + | |
120 | 104 | | |
121 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| 316 | + | |
314 | 317 | | |
315 | 318 | | |
316 | 319 | | |
| |||
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
| 415 | + | |
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
| |||
590 | 594 | | |
591 | 595 | | |
592 | 596 | | |
| 597 | + | |
593 | 598 | | |
594 | 599 | | |
595 | 600 | | |
| |||
0 commit comments