beets/test
Axel Wikström b21c231048 Enable duplicate detection for as-is imports
When importing with autotag=no, duplicate detection was skipped entirely
because the import_asis stage called _apply_choice() directly without
first calling _resolve_duplicates(). This meant the duplicate_keys and
duplicate_action config options were ignored for as-is imports.

This was a known limitation documented by a FIXME comment added in
commit 79d1203541 (Sep 2014): "We should also resolve duplicates when
not autotagging." The FIXME was later removed during a comment cleanup
(f145e3b18) but the issue was never addressed.

This commit adds the _resolve_duplicates() call to import_asis, ensuring
duplicate detection works consistently regardless of the autotag setting.
This applies to both album imports and singleton imports.

Test changes:
- Renamed test_no_autotag_keeps_duplicate_album to
  test_no_autotag_removes_duplicate_album to verify the corrected behavior
- Added test_no_autotag_removes_duplicate_singleton to verify singleton
  duplicate detection also works with autotag=no

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 20:51:44 +02:00
..
autotag Define a shared fixture for config 2025-12-27 14:30:35 +00:00
plugins ftintitle: fix changelog conflict 2026-01-08 12:20:25 -08:00
rsrc musicbrainz: lookup release directly 2025-12-20 01:35:51 +00:00
ui Define a shared fixture for config 2025-12-27 14:30:35 +00:00
util Move human formatting functions under beets.util.units 2025-07-06 16:09:50 +01:00
__init__.py Remove unused imports 2021-08-26 20:59:48 +10:00
conftest.py Define a shared fixture for config 2025-12-27 14:30:35 +00:00
test_art_resize.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_autotag.py Define a shared fixture for config 2025-12-27 14:30:35 +00:00
test_datequery.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_dbcore.py style: remove extraneous pass statements 2025-09-19 21:11:51 +01:00
test_files.py reflink() doesn't take Path parameters 2025-11-23 13:50:57 -04:00
test_hidden.py Fix duplicate database change event send on Library.add (#5561) 2025-05-30 13:41:29 +00:00
test_importer.py Enable duplicate detection for as-is imports 2026-01-10 20:51:44 +02:00
test_library.py Replace percent formatting 2025-08-30 22:35:00 +01:00
test_logging.py fix: Sanitize log messages by removing control characters 2025-12-02 15:27:24 +05:00
test_m3ufile.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_metasync.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_pipeline.py pipeline: remove old tests, integrate with out test suite 2025-05-06 14:51:20 +02:00
test_plugins.py Move PromptChoice to beets.util module 2025-12-02 01:51:14 +00:00
test_query.py Refactor test_query 2025-07-06 16:15:30 +01:00
test_release.py Update release conversion logic accordingly 2025-08-10 16:25:05 +01:00
test_sort.py pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
test_template.py Fix formatting 2025-05-07 10:41:01 +01:00
test_types.py Add NullPathType and types to PathType 2025-07-06 16:09:49 +01:00
test_util.py Simplify and speed up plurality/album tags retrieval tests 2025-05-31 19:17:42 +01:00
testall.py Remove def suite TestLoader definitions 2024-07-28 18:58:51 +01:00