Commit Graph

24 Commits

Author SHA1 Message Date
shara987
ba48bf8480 zero: fix ruff formatting 2026-04-25 16:28:06 +01:00
shara987
071c12cc70 zero: treat images and art as aliases in keep_fields
Fixes #3532: when 'images' is listed in keep_fields, embedded album
art was still being removed because the plugin didn't recognize 'art'
as an alias for 'images'. Now both fields are kept when either appears
in keep_fields.
2026-04-25 16:28:06 +01:00
shara987
a0041356cd zero: treat 'images' and 'art' as aliases in keep_fields
Fixes #3532: when 'images' is listed in keep_fields, embedded album
art was still being removed because the plugin didn't recognize 'art'
as an alias for 'images'. Now both fields are kept when either appears
in keep_fields.
2026-04-25 16:28:06 +01:00
Šarūnas Nejus
91fae7c879 Merge branch 'master' into zero-total-discs 2026-03-02 16:37:43 +00:00
Fredrik Möllerstrand
cd9f86ae6d feat: zero plugin zeroes disctotal if single disc
When omit_single_disc is set, disctotal is now also zeroed alongside disc.
Previously, only the disc tag was zeroed.
2026-02-14 18:32:04 +01:00
Šarūnas Nejus
fea789bb59 Replace control_stdin with io.addinput 2026-02-10 00:53:20 +00:00
Michael Krieger
df8cd23ae7 Add back tests as they were.
Add back tests as they were.
2025-10-14 03:17:34 +01:00
Michael Krieger
dc13308784 Remove tests. Update docs. Remove unnecessary return
Remove tests.  Update docs.  Remove unnecessary return.
2025-10-14 03:17:34 +01:00
Michael Krieger
b1c87cd98c Change parameter name, add return, add tests
Change the parameter name to omit_single_disc (vs previously zero_disc_if_single_disc)

Add return of 'fields_set' so that, if triggered by the command line `beets zero`, it will still effect the item.write.

Added tests.
2025-10-14 03:17:34 +01:00
Šarūnas Nejus
7be8f9c97a Update CI config, minimum ruff version, docs and add changelog note 2024-12-10 06:10:03 +00:00
Šarūnas Nejus
9a05d27acf Replace assertEqual 2024-08-12 08:43:42 +01:00
Šarūnas Nejus
6631b6aef6 Replace assertNotIn 2024-08-12 08:43:42 +01:00
Šarūnas Nejus
5d4911e905 Replace assertIsNone 2024-08-12 08:43:41 +01:00
Šarūnas Nejus
cb82917fe0 Replace assertFalse 2024-08-12 08:43:41 +01:00
Šarūnas Nejus
5f395ab4f4 Configure plugins using PluginMixin.configure_plugin 2024-07-29 15:33:12 +01:00
Šarūnas Nejus
199f3079f2 Use PluginMixin in tests that load plugins manually
A constant `preload_plugin` is used to disable loading the plugin in the
`setUp` initialisation, allowing the plugin to be loaded manually by the
tests.

Also added a cleanup instruction to remove listeners from configured
plugins, and removed this logic from several tests.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
fcff5d72af Remove def suite TestLoader definitions 2024-07-28 18:58:51 +01:00
Šarūnas Nejus
2d5fd907c3 Remove redundant setup_beets and teardown_beets instructions 2024-07-28 18:58:34 +01:00
Šarūnas Nejus
6c1e26acc9 Replace unittest.TestCase, TestHelper by BeetsTestCase 2024-07-28 18:58:34 +01:00
freddiewanah
e0de6e1b89 refactor the test methods to avoid suboptimal asserts. 2024-04-08 21:39:25 +08:00
Serene-Arc
83242fd7cf Apply formatting 2024-03-01 15:21:25 +10:00
Lars Kruse
508d28f66b tests: move reusable test-related modules into the beets package
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
2024-01-15 19:40:57 +01:00
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Serene-Arc
84c0ab6857 Correctly refactor tests 2023-10-17 19:39:03 +10:00