Running unit tests for the lyrics plugin, specifically LRCLibLyricsTest, it seems that self.config is not re-initialized before each test.
When fixing an issue regarding synced lyrics (see #5089), I noticed that some LRCLib tests were failing after I changed plugin.config["synced"] to true in a test I added. To circumvent that, I explicitly set it to false for the failing tests and that fixed the issue. However, the issue remains that the config seems to persist between individual tests, which it shouldn't do.
To reproduce, checkout the code in #5089, comment out self.plugin.config["synced"] = False in test_fetch_synced_lyrics and test_fetch_plain_lyrics and run the tests in LRCLibLyricsTest.
Problem
Running unit tests for the
lyrics
plugin, specificallyLRCLibLyricsTest
, it seems thatself.config
is not re-initialized before each test.When fixing an issue regarding synced lyrics (see #5089), I noticed that some LRCLib tests were failing after I changed
plugin.config["synced"]
totrue
in a test I added. To circumvent that, I explicitly set it tofalse
for the failing tests and that fixed the issue. However, the issue remains that the config seems to persist between individual tests, which it shouldn't do.To reproduce, checkout the code in #5089, comment out
self.plugin.config["synced"] = False
intest_fetch_synced_lyrics
andtest_fetch_plain_lyrics
and run the tests inLRCLibLyricsTest
.Setup