Skip to content

Commit 9c4b1f7

Browse files
committed
test(cli): widen _patch_iter procs type for mixed fake/raising fixtures
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent d4bb43d commit 9c4b1f7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/cli/test_db_reset_zombie_check.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ def __init__(self, pid: int, cmdline: list[str] | None):
1818
self.info = {"pid": pid, "cmdline": cmdline}
1919

2020

21-
def _patch_iter(monkeypatch: pytest.MonkeyPatch, procs: list[_FakeProc]) -> None:
21+
def _patch_iter(monkeypatch: pytest.MonkeyPatch, procs) -> None:
22+
"""Replace psutil.process_iter with a fixed iterator.
23+
24+
Procs is intentionally untyped: tests pass a mix of _FakeProc and
25+
error-raising stand-ins to exercise the per-process exception path.
26+
"""
2227
monkeypatch.setattr(
2328
psutil,
2429
"process_iter",

0 commit comments

Comments
 (0)