(target: int)
| 265 | attempts: list[int] = [] |
| 266 | |
| 267 | def close(target: int) -> None: |
| 268 | if target == fd: |
| 269 | attempts.append(target) |
| 270 | raise error |
| 271 | real_close(target) # pragma: no cover # only an unrelated __del__ close during the mock window reaches here |
| 272 | |
| 273 | mocker.patch("os.close", side_effect=close, autospec=True) |
| 274 | return attempts |
nothing calls this directly
no outgoing calls
no test coverage detected