Skip to content

fix: don't leak test tmp files into recent-files - #574

Open
azfoo wants to merge 1 commit into
TimeLineAnnotator:devfrom
azfoo:fix/test-recent-files-pollution
Open

fix: don't leak test tmp files into recent-files#574
azfoo wants to merge 1 commit into
TimeLineAnnotator:devfrom
azfoo:fix/test-recent-files-pollution

Conversation

@azfoo

@azfoo azfoo commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

use_test_settings was scope=module and only pulled in transitively via the qtui fixture, so backend-only tests (using just the tilia/tilia_state fixtures, no qtui) never redirected tilia.settings.settings to the test QSettings store. Any such test that opened/saved a file wrote its tmp_path straight into the developer's real "Desktop Settings" store, polluting the actual app's Open Recent menu.

Make the fixture session-scoped and autouse so the redirect happens before any test touches settings, regardless of which other fixtures it requests.

use_test_settings was scope=module and only pulled in transitively via the qtui fixture, so backend-only tests (using just the tilia/tilia_state fixtures, no qtui) never redirected tilia.settings.settings to the test QSettings store. Any such test that opened/saved a file wrote its tmp_path straight into the developer's real "Desktop Settings" store, polluting the actual app's Open Recent menu.

Make the fixture session-scoped and autouse so the redirect happens before any test touches settings, regardless of which other fixtures it requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant