beets icon indicating copy to clipboard operation
beets copied to clipboard

lyrics: config in tests not reset before each test

Open edgars-supe opened this issue 4 months ago • 0 comments

Problem

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.

Setup

  • OS: Linux Mint 21.2
  • Python version: 3.10.12
  • beets version: 1.6.1

edgars-supe avatar Mar 02 '24 06:03 edgars-supe