test: extend launch smoke coverage for secondary windows#35
Merged
Conversation
…tiation Extends test_smoke_launch.py with test_secondary_windows_instantiate, which boots a BlitztextApp offscreen and verifies that all three previously uncovered dialog/panel constructors (HistoryPanel, TtsWindow, SettingsDialog) produce live objects without errors. SettingsDialog is instantiated directly to avoid the exec() call in show_settings_dialog(); History and TTS use the same lazy-init path as production code. Completes the smoke coverage goal: MainWindow, Tray, Compose, Settings, TTS, and History are now all exercised under WHISPER_GUI_TESTS=1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_secondary_windows_instantiatetotests/test_smoke_launch.pyQT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1:HistoryPanelviaapp.show_history_panel()(lazy-init path, same as production)TtsWindowviaapp.show_tts_window()(lazy-init path)SettingsDialog(config)directly —show_settings_dialog()callsexec()which would block; direct instantiation is the correct offscreen strategyNo runtime side effects
tmp_pathfixture; real user config never readstop_hotkey_worker()called before any window is shown; no real evdev threadXDG_RUNTIME_DIRmanipulationtry/finallyresets language state to prevent bleed into subsequent testsTest plan
QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 python -m pytest tests/test_smoke_launch.py -v→ 4 passedpython -m pytest -q→ 395 passedpython3 -m compileall app tests→ OKgit diff --check→ no whitespace errors