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

Make sure tests do not leave any temp files behind #5345

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Jul 2, 2024

  1. Configuration menu
    Copy the full SHA
    b80b898 View commit details
    Browse the repository at this point in the history
  2. test_art, test_embedart: Define FetchImageHelper without _common.Test…

    …Case
    
    And move the definition to a shared module.
    
    The problem was that EmbedartCliTest ran `_common.TestCase.setUp`
    method which initialised temporary directory for the tests AND ran
    `helper.TestHelper.setup_beets` method which initialised another set of
    temporary directories. This meant that the first set of directories
    could not be tracked down for the cleanup.
    snejus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    56d9d96 View commit details
    Browse the repository at this point in the history
  3. fetchart, artresizer: Create art files in predictable directories

    This allows to clean them up in art (1) fetching, (2) resizing and (3)
    deinterlace tests.
    snejus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    1fda7b6 View commit details
    Browse the repository at this point in the history
  4. TestHelper: Create mediafield fixtures within temp_dir

    This way they get automatically removed with removal of temp_dir.
    
    After this change `test/plugins/test_zero.py` does not any more leave
    any mediafield fixtures hanging around.
    snejus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    c904521 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0682d0d View commit details
    Browse the repository at this point in the history
  6. test_config_command: use TestHelper to manage temp dir

    Due to some weird race conditions the temporary directories were not
    getting torn down for four of the tests. I failed to figure out why, and
    I found that using TestHelper to manage the temporary directory somehow
    fixes this.
    snejus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    12730aa View commit details
    Browse the repository at this point in the history
  7. test_plugins.py: dedupe setUp, tearDown usage

    And most importantly, remove a redudant invocation of `setup_beets`
    which left temporary directories hanging around without getting cleaned
    up.
    snejus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    f6b45f5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    812bcb9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    df08555 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    83a4d71 View commit details
    Browse the repository at this point in the history