beets/test/plugins
Guy Bloom 2bd77b9895
Fix convert --format with never_convert_lossy_files (#6171)
## Description

Fixes #5625 

When `convert.never_convert_lossy_files` is enabled, `beet convert` was
ignoring the explicit `--format` option and just copying the lossy files
without
transcoding them. For example:

- `beet convert format:mp3 --format opus`

would still produce MP3 files instead of OPUS.

Change:

- Allows to override options `never_convert_lossy_files`, `max_bitrate`
or `no_convert` for `beet convert` as well as trying to convert to the
same format as existing already with a new option `--force`. That way,
for example lossy files selected by the query are transcoded to the
requested format anyway.
- Keeps existing behavior for automatic conversion on import (no CLI
override there).
- Adds tests to cover checking whether `--force` correctly overrides
settings or CLI options.
- Documents the behavior in the convert plugin docs

Co-authored-by: J0J0 Todos <jojo@peek-a-boo.at>
2025-12-03 22:48:41 +01:00
..
utils Move vfs.py to beetsplug._utils package to avoid polluting core namespace (#6017) 2025-10-01 12:28:18 +02:00
__init__.py Correctly refactor tests 2023-10-17 19:39:03 +10:00
lyrics_pages.py lyrics: xfail sweetslyrics end-to-end test 2025-08-30 23:10:22 +01:00
test_acousticbrainz.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_advancedrewrite.py Update CI config, minimum ruff version, docs and add changelog note 2024-12-10 06:10:03 +00:00
test_albumtypes.py musicbrainz: synchronise plugin import path 2025-05-17 03:31:58 +01:00
test_art.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_aura.py pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
test_autobpm.py Skip autobpm tests if librosa isn't available 2024-11-30 09:32:08 -04:00
test_bareasc.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_beatport.py Use unittest.TestCase for tests that don't require the dir setup 2025-05-26 12:40:38 +01:00
test_bpd.py Rename test_player -> test_bpd 2025-07-16 14:06:35 +01:00
test_bucket.py Future proof BucketPluginTest.test_year_single_year_last_folder 2024-12-27 16:28:38 -04:00
test_convert.py Fix convert --format with never_convert_lossy_files (#6171) 2025-12-03 22:48:41 +01:00
test_discogs.py Update configuration format. 2025-10-03 14:44:22 -07:00
test_edit.py Replace assertCount 2025-07-09 09:21:51 +01:00
test_embedart.py fix test by changing patch 2025-09-21 08:04:51 -07:00
test_embyupdate.py Fix formatting 2025-05-07 10:41:01 +01:00
test_export.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_fetchart.py Replace assertEqual 2024-08-12 08:43:42 +01:00
test_filefilter.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_fromfilename.py Refactor tests using pytest 2025-09-30 15:54:33 +02:00
test_ftintitle.py Add album template value in ftintitle plugin 2025-11-21 18:31:59 +01:00
test_hook.py pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
test_ihate.py Replace assertFalse 2024-08-12 08:43:41 +01:00
test_importadded.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_importfeeds.py pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
test_importsource.py importsource: Add new plugin (+docs/tests/changlog) 2025-10-29 08:50:01 +01:00
test_info.py Replace assertEqual 2024-08-12 08:43:42 +01:00
test_inline.py Fixed unit tests import 2025-11-25 18:41:31 -05:00
test_ipfs.py Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
test_keyfinder.py Replace assertEqual 2024-08-12 08:43:42 +01:00
test_lastgenre.py Show genre change using show_model_changes 2025-10-15 11:14:26 +01:00
test_limit.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_lyrics.py fix local langdetect test failures 2025-05-31 18:56:21 -04:00
test_mbpseudo.py Prefer alias if import languages not defined 2025-11-01 13:52:14 +01:00
test_mbsubmit.py Centralize AutotagStub test setup into AutotagImportTestCase 2025-05-17 03:31:58 +01:00
test_mbsync.py Fixed imports for all tests and added a bit of stricter type checking. 2025-07-15 15:03:14 +02:00
test_mpdstats.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
test_musicbrainz.py Add tests. 2025-11-11 17:08:46 -08:00
test_parentwork.py Do not use backslashes to deal with long strings 2025-08-30 23:10:20 +01:00
test_permissions.py Replace assertPrem 2025-07-09 09:21:52 +01:00
test_play.py play plugin: $playlist marker for precise control where the playlist … (#4728) 2025-10-19 08:38:20 +02:00
test_playlist.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_plexupdate.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_plugin_mediafield.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_random.py Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
test_replace.py Feat: Add replace plugin (#5644) 2025-05-27 00:17:52 +02:00
test_replaygain.py Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
test_scrub.py Move scrub test to a separate file 2025-05-17 03:32:00 +01:00
test_smartplaylist.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_spotify.py Spotify tests are now consistent with quote change 2025-09-27 13:22:41 +02:00
test_subsonicupdate.py Use unittest.TestCase for tests that don't require the dir setup 2025-05-26 12:40:38 +01:00
test_substitute.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_the.py Use unittest.TestCase for tests that don't require the dir setup 2025-05-26 12:40:38 +01:00
test_thumbnails.py Remove no-op decargs 2025-07-08 11:37:33 +01:00
test_titlecase.py New Plugin: Titlecase (#6133) 2025-11-23 10:34:05 -08:00
test_types_plugin.py refactor: convert _types from class attributes to cached properties 2025-07-16 14:45:25 +01:00
test_web.py plugins/web: fix endpoints /…/values/… 2025-11-15 21:02:38 +01:00
test_zero.py Add back tests as they were. 2025-10-14 03:17:34 +01:00