fix(lastgenre): Reset plugin config in fixtured tests#6386
Open
Nukesor wants to merge 1 commit intobeetbox:masterfrom
Open
fix(lastgenre): Reset plugin config in fixtured tests#6386Nukesor wants to merge 1 commit intobeetbox:masterfrom
Nukesor wants to merge 1 commit intobeetbox:masterfrom
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6386 +/- ##
=======================================
Coverage 68.96% 68.96%
=======================================
Files 140 140
Lines 18685 18688 +3
Branches 3056 3056
=======================================
+ Hits 12886 12889 +3
Misses 5155 5155
Partials 644 644
🚀 New features to boost your workflow:
|
6bc305b to
9a8b2ac
Compare
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.
9a8b2ac to
67544a4
Compare
Contributor
Author
|
The test failure seems to be a flaky one? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
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 5 tests that depended on
count: 10being set on previous test fixtures, which I adjusted accordingly.Discovered and discussed in #6317 , see #6317 (comment)