- Removing the coverage omit configuration exposed unused branches, helpers, and
fixtures across the test suite.
- Delete that redundant logic and simplify affected tests while preserving their
behavior.
When using `beet mod -a` to set a multi-value field (e.g. artists,
genres, composers) on an album, the value string was being split into
individual characters when propagated to items. This happened because:
1. `Album._type('artists')` returned `DEFAULT` since `artists` is not
an Album fixed field, so `_parse` returned a plain string.
2. `DelimitedString.normalize` fell through to `model_type(value)`
(= `list(value)`) for string input, splitting it into characters.
Two fixes:
- `DelimitedString.normalize`: handle string input by parsing it
(splitting by delimiter if present) instead of calling `list()`.
- `Model._type`: fall back to the related model's field/type
definitions so multi-value field types are recognized on both
Album and Item.
Fixes#5690
Update all references in core, plugins, and tests to import UserError
from the new location. This centralizes exception handling and improves
code organization.
Convert item paths to relative on write and back to absolute on read,
keeping the database free of hardcoded library directory. Fix tests to
account for absolute path return values.
Replace multiple small tests with two comprehensive snapshot tests
covering the same edge cases and newline and column layouts.
Use BeetsTestCase to ensure that the local dev config is ignored.
Create a centralised pytest fixture to provide controllable stdin and
captured stdout in all tests. Simplify DummyIO/DummyIn and remove the
custom DummyOut implementation and make use of pytest builtin fixtures.
Create a centralised pytest fixture to provide controllable stdin and
captured stdout that can be applied to any tests, regardless whether
they are based on pytest or unittest.
* `io` fixture can be used as a fixture in pytest-based tests
* `IOMixin` can be used to attach `io` attribute to any test class,
including `unittest.TestCase`
Moved tests related to ui into own folder.
Moved 'modify' command tests into own file.
Moved 'write' command tests into own file.
Moved 'fields' command tests into own file.
Moved 'do_query' test into own file.
Moved 'list' command tests into own file.
Moved 'remove' command tests into own file.
Moved 'move' command tests into own file.
Moved 'update' command tests into own file.
Moved 'show_change' test into test_import file.
Moved 'summarize_items' test into test_import file.
Moved 'completion' command test into own file.