Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lyrics: config in tests not reset before each test #5133

Open
edgars-supe opened this issue Mar 2, 2024 · 0 comments · May be fixed by #5406
Open

lyrics: config in tests not reset before each test #5133

edgars-supe opened this issue Mar 2, 2024 · 0 comments · May be fixed by #5406
Assignees
Labels
refactor testing Relates to the testing/CI infrastructure

Comments

@edgars-supe
Copy link
Contributor

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
@snejus snejus added refactor testing Relates to the testing/CI infrastructure labels Sep 9, 2024
@snejus snejus self-assigned this Sep 9, 2024
@snejus snejus linked a pull request Sep 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor testing Relates to the testing/CI infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants