beets/test
Axel Wikström b5d8ced9d9 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-03-04 14:26:13 +00:00
..
autotag Move test_autotag tests under test/autotag 2026-03-03 07:48:52 +00:00
library Remove genre field 2026-02-27 18:34:26 +00:00
plugins Add tests 2026-03-03 13:53:12 +00:00
rsrc Stop overwriting this test file name 2026-02-27 18:34:26 +00:00
ui Fix the rest of the tests 2026-02-27 18:34:26 +00:00
util Enable RUF rules 2026-01-13 20:55:40 +00:00
__init__.py
conftest.py Replace custom stdio mocks with pytest io fixture 2026-02-10 00:53:20 +00:00
test_art_resize.py Enable RUF rules 2026-01-13 20:55:40 +00:00
test_datequery.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
test_dbcore.py Merge branch 'master' into indices 2026-01-30 01:03:18 +00:00
test_files.py Fix symlink tests for macOS 2026-03-02 09:24:25 +00:00
test_hidden.py
test_importer.py Enable duplicate detection for as-is imports 2026-03-04 14:26:13 +00:00
test_library.py Clarify tests 2026-02-27 18:36:04 +00:00
test_logging.py fix: Sanitize log messages by removing control characters 2025-12-02 15:27:24 +05:00
test_m3ufile.py
test_metadata_plugins.py Simplify tests 2026-01-31 23:42:09 +00:00
test_metasync.py Replace capture_output with io.getoutput 2026-02-10 00:53:20 +00:00
test_pipeline.py
test_plugins.py Fix multi-value delimiter handling in templates 2026-02-22 16:12:58 +00:00
test_query.py Fix the rest of the tests 2026-02-27 18:34:26 +00:00
test_release.py Improve reference title for command links 2026-02-08 07:28:09 +00:00
test_sort.py Fix the rest of the tests 2026-02-27 18:34:26 +00:00
test_template.py
test_types.py
test_util.py
testall.py