Commit Graph
10 Commits
Author SHA1 Message Date
Šarūnas Nejus e5846915d4 modify: fix selecting objects 2026-08-27 06:47:39 +01:00
Šarūnas Nejus 04c2304879 Replace item.path with item.filepath in tests 2026-07-30 12:18:49 +01:00
dong 7cc3e0b5a4 Support multi-value modify operators 2026-07-08 12:12:15 +01:00
Šarūnas Nejus 230bf19c7f Remove redundant test logic exposed by full coverage
- 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.
2026-07-07 15:57:35 +01:00
Šarūnas Nejus 5be035f49d Enable and fix flake8-pie 2026-06-09 00:14:06 +01:00
Betterlol 38423eb6f4 Fix album modify splitting multi-value strings into characters
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
2026-05-19 02:04:44 +08:00
Šarūnas Nejus 02be9b277d Handle legacy fields in modify and queries 2026-04-07 10:42:56 +01:00
Šarūnas Nejus fea789bb59 Replace control_stdin with io.addinput 2026-02-10 00:53:20 +00:00
Šarūnas Nejus c52656fb0a Enable RUF rules 2026-01-13 20:55:40 +00:00
Sebastian Mohr a59e41a883 tests: move command tests into dedicated files
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.
2025-11-03 14:00:58 +01:00