mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-03-20 11:57:46 +08:00
The BangumiDatabase.search_all() uses a module-level TTL cache that persists across tests using different in-memory SQLite databases. This caused test_migrate_preserves_existing_data and test_migrate_idempotent to return stale cached results (1 bangumi instead of 2). Add an autouse fixture in conftest.py to clear the cache before and after each test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>