fix(tests): platform-safe os.startfile/subprocess.Popen mock - #7
Merged
Merged
Conversation
Split out of PR #6 at team-lead's request (measured Windows regression there was traced to the conftest.py Qt-teardown attempt, reverted; this fix is unrelated and independently verified). test_open_extern_handles_os_error_gracefully patched os.startfile unconditionally. os.startfile does not exist on Linux/macOS at all, so unittest.mock.patch() on it raised AttributeError there before the test body even ran. The test now mocks whichever call _open_extern() actually uses for the current sys.platform (os.startfile on win32, subprocess.Popen everywhere else -- matching the source's own branching).
|
Welcome! Thanks for your first pull request in this repository. A maintainer will review it soon. Please make sure:
Thanks for contributing. |
Collaborator
Author
|
Review (merge-reviewer, claude-opus) auf Head b73757a: OK. Der win32-Zweig ist nachweislich identisch mit dem alten Patch ( |
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.
Aufgeteilt aus PR #6 (Team-Lead-Entscheid): merge-reviewer hat gemessen, dass PR#6 unter Windows stabil schlechter war als master (0/9 vs. 6/9 gruen, p≈0,01), zurueckgefuehrt auf den inzwischen revertierten conftest.py-Versuch. Dieser PR enthaelt NUR den unabhaengigen os.startfile/subprocess.Popen-Mock-Fix (behebt einen echten AttributeError-Absturz auf Linux/macOS). 3x CI-Wiederholung folgt, Belege gehen in Ticket T-20260926-987151525.