Commit 86fac4b
authored
fix(lastgenre): Reset plugin config in fixtured tests (#6386)
Fixes a bug in the lastgenre plugin, where test state bled into the
following fixtures.
Each plugin has a view to the global persisted beets.config field. As a
result, config variables that aren't explicitly overwritten are
persisted in that global config view.
This commit exposes the lastgenre default config as a static method and
uses that default config to reset the state in between fixture calls.
There were 3 tests that depended on `count: 10` being set on previous
test fixtures, which I adjusted accordingly.
Discovered and discussed in #6317 , see
#6317 (comment)1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
206 | 216 | | |
207 | 217 | | |
208 | 218 | | |
| |||
232 | 242 | | |
233 | 243 | | |
234 | 244 | | |
| 245 | + | |
235 | 246 | | |
236 | 247 | | |
237 | 248 | | |
| |||
264 | 275 | | |
265 | 276 | | |
266 | 277 | | |
| 278 | + | |
267 | 279 | | |
268 | 280 | | |
269 | 281 | | |
| |||
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
| 328 | + | |
316 | 329 | | |
317 | 330 | | |
318 | 331 | | |
| |||
545 | 558 | | |
546 | 559 | | |
547 | 560 | | |
548 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
549 | 564 | | |
550 | 565 | | |
551 | 566 | | |
| |||
0 commit comments