Conversation
|
| Filename | Overview |
|---|---|
| tests/browser_smoke.py | Adds CREATE_NO_WINDOW creationflag via the named constant on Windows to suppress the console window for the long-lived server subprocess. |
| tests/conftest.py | Applies the same CREATE_NO_WINDOW pattern to the test-server fixture subprocess; sys is already imported at the top of this file. |
| tests/test_ctl_script.py | Applies CREATE_NO_WINDOW to both the fake-launchd bash helper and the sleeper Python subprocess; no logic changes. |
| tests/test_tls_support.py | Adds import sys, reorders imports to strict alphabetical order, and applies CREATE_NO_WINDOW to the long-lived TLS server subprocess. Short-lived openssl subprocess.run calls are intentionally left unchanged. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Test process starts subprocess.Popen] --> B{sys.platform == 'win32'?}
B -- Yes --> C[Pass creationflags: CREATE_NO_WINDOW]
B -- No --> D[Pass no extra flags]
C --> E[Child process starts without console window]
D --> F[Child process starts normally]
E --> G[Tests run / subprocess stays alive]
F --> G
Reviews (2): Last reviewed commit: "test(windows): use CREATE_NO_WINDOW cons..." | Re-trigger Greptile
|
@nesquena-hermes Can you fast-track this please? It is killing my workflow. |
…indows #3710) (#3753) * test(windows): hide test helper console windows (#3706) * test(windows): use CREATE_NO_WINDOW constant (#3706) * test(windows): hide test-helper console windows on Windows (#3710 fixes #3706) @rodboev. Long-lived test helper subprocesses (test server, browser-smoke, TLS helper, ctl helpers) now spawn with CREATE_NO_WINDOW on Windows so a local pytest run doesn't pop focus-stealing console windows. sys.platform=='win32' guarded → no-op on macOS/Linux (expands to **{}). Test-only, no production code, no user impact. + CHANGELOG v0.51.301. --------- Co-authored-by: Rod Boev <rod.boev@gmail.com> Co-authored-by: nesquena-hermes <[email protected]>
|
Shipped — thanks @rodboev! 🎉 This landed in v0.51.301 (commit Issue #3706 is closed. Closing this PR as shipped-via-cherry-pick. Thanks for fixing all five call sites — the parallel-worktree run is much more usable now. |
…indows nesquena#3710) (nesquena#3753) * test(windows): hide test helper console windows (nesquena#3706) * test(windows): use CREATE_NO_WINDOW constant (nesquena#3706) * test(windows): hide test-helper console windows on Windows (nesquena#3710 fixes nesquena#3706) @rodboev. Long-lived test helper subprocesses (test server, browser-smoke, TLS helper, ctl helpers) now spawn with CREATE_NO_WINDOW on Windows so a local pytest run doesn't pop focus-stealing console windows. sys.platform=='win32' guarded → no-op on macOS/Linux (expands to **{}). Test-only, no production code, no user impact. + CHANGELOG v0.51.301. --------- Co-authored-by: Rod Boev <rod.boev@gmail.com> Co-authored-by: nesquena-hermes <[email protected]>
Thinking Path
subprocess.Popen, and each unflagged child opens a visible console window.conftest.pyandbrowser_smoke.pywould leave other focus-stealing helpers behind.CREATE_NO_WINDOWkwargs at each known helper spawn and leave all non-Windows behavior untouched.What Changed
tests/conftest.py: hide the main test server fixture subprocess on Windows.tests/browser_smoke.py: hide the browser smoke server subprocess on Windows.tests/test_tls_support.py: hide the TLS helper server subprocess on Windows.tests/test_ctl_script.py: hide both long-lived helper subprocesses used by the ctl tests on Windows.Why It Matters
Windows full-suite runs stop spawning foreground console windows for each helper process, so parallel local testing no longer steals focus or makes the machine unusable. The change is test-only and preserves existing behavior everywhere else.
Verification
tests/test_tls_support.py::TestTLSEndToEnd::test_tls_startup_failure_fallback_to_httpstill fails on cleanorigin/masterbecause it importsfcntl, which is not available on Windows. This branch does not change that assertion path.Risks / Follow-ups
subprocess.Popentest helpers; future long-lived test subprocesses should follow the same Windows launch pattern.Model Used
GPT-5.5 via Codex CLI