nightly-e16144e2-ls347
Pre-releaseCI 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:
- Adds
NEEDS_PY7ZR(is_importable("py7zr")) andNEEDS_RARFILE
(is_importable("rarfile") and has_program("unrar")) test skip markers
inbeets.test.helper. - Marks
TestImport7zwith@NEEDS_PY7ZR. - Marks
TestImportRarwith@NEEDS_RARFILE. - Adds an unreleased bug fix entry to
docs/changelog.rst.
To Do
-
Documentation. - Changelog.
- Tests.