fix: pin sys.platform=linux in test_is_pid_alive_dead — Windows runners take the OpenProcess path so the os.kill mock never fires; test reds whenever PID 1234 is alive on the runner (first hit today, 6/6 sibling tests were already pinned by ca096295). 38 presence tests green.
This commit is contained in:
@@ -30,6 +30,15 @@ PyPI version — not the changelog header.
|
||||
(9.3k → 7.9k chars, under its ~8k injection cap) with the comms doctrine
|
||||
intact.
|
||||
|
||||
- **Windows flake pinned: `test_is_pid_alive_dead` escaped the ca096295
|
||||
sweep.** That commit's rule — tests mocking `os.kill` must pin
|
||||
`sys.platform="linux"` because Windows takes the ctypes OpenProcess path and
|
||||
never reaches the mock — was applied to every pid-liveness test except this
|
||||
one. It only failed when PID 1234 happened to be alive on the runner
|
||||
(environment lottery, first hit today). Pinned like its siblings. The
|
||||
remaining Windows session_boot reds and the relay mtime-cache flake predate
|
||||
this PR and stay parked.
|
||||
|
||||
## [2026-07-14]
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -431,7 +431,7 @@ class TestLiveness:
|
||||
mock_kill.assert_called_once_with(1234, 0)
|
||||
|
||||
def test_is_pid_alive_dead(self):
|
||||
with patch("os.kill", side_effect=ProcessLookupError):
|
||||
with patch("sys.platform", "linux"), patch("os.kill", side_effect=ProcessLookupError):
|
||||
assert presence._is_pid_alive(1234) is False
|
||||
|
||||
def test_is_pid_alive_permission_error(self):
|
||||
|
||||
Reference in New Issue
Block a user