Skip to content

nightly-e16144e2-ls347

Pre-release
Pre-release

Choose a tag to compare

@LinuxServer-CI LinuxServer-CI released this 12 Sep 11:36
· 8 commits to nightly since this release
a7d0b4f

CI Report:

https://ci-tests.linuxserver.io/linuxserver/beets/nightly-e16144e2-ls347/index.html

LinuxServer Changes:

No changes

Remote Changes:

importer: skip TestImport7z and TestImportRar when optional dependencies are missing (#7004)

Description

Fixes #7002.

Both py7zr and rarfile are optional dependencies specified under the
import extra (beets[import]).
When running the test suite in environments where py7zr is not
installed (e.g. minimal packaging buildroots such as Fedora Rawhide),
ArchiveImportTask.handlers does not register the 7z extraction
handler. Consequently, TestImport7z runs unconditionally and treats
archive.7z as an ordinary file rather than an archive, failing with:

FAILED test/test_importer.py::TestImport7z::test_import_zip
E       assert 0 == 1
E        +  where 0 = len(<beets.dbcore.db.Results object>)
E        +    where <beets.dbcore.db.Results object> = items()
WARNING beets:stages.py:58 No files imported from .../test/rsrc/archive.7z

Additionally, TestImportRar previously checked only for the presence
of the unrar executable via has_program("unrar"), but extraction
also depends on the Python rarfile package being importable.

This PR:

  1. Adds NEEDS_PY7ZR (is_importable("py7zr")) and NEEDS_RARFILE
    (is_importable("rarfile") and has_program("unrar")) test skip markers
    in beets.test.helper.
  2. Marks TestImport7z with @NEEDS_PY7ZR.
  3. Marks TestImportRar with @NEEDS_RARFILE.
  4. Adds an unreleased bug fix entry to docs/changelog.rst.

To Do

  • Documentation.
  • Changelog.
  • Tests.