You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/chains_test.py::test_a_descriptor_that_cannot_be_inspected_is_closed_and_refused fails under pytest 9.2.0 with OSError: no fstat, raised by the test's own fake. The test replaces os.fstat for the whole process. pytest 9.2.0's fd-level capture now calls os.fstat on its own buffer after the call phase (pytest-dev/pytest#14687), before the monkeypatch is undone, and gets the fake. cookie_auth itself behaves: the pytest.raises and the descriptor count both pass first.
The fix is in the test: the fake fails only for the cookie file's descriptor and hands every other descriptor to the real os.fstat.
# on origin/main, at the lock: 1 passed# uv run pytest --no-cov -n 0 "tests/chains_test.py::test_a_descriptor_that_cannot_be_inspected_is_closed_and_refused"# after `uv lock --upgrade` (pytest 9.2.0): 1 failed, --tb=native shows# _pytest/capture.py, line 595, in snap# if os.fstat(self.tmpfile.fileno()).st_size == 0:# tests/chains_test.py, line 331, in failing_fstat# raise OSError("no fstat")
Activity
Fail fstat for chains.py alone in the descriptor test (closes #713)
Fail fstat for chains.py alone in the descriptor test (closes #713) (#…