Test hygiene: forget the refused study, quiet _Tee on a closed stream, wait for connector recovery

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-14 23:41:31 +02:00
co-authored by Claude Opus 5.5
parent f2305ef619
commit 8e65ce41cb
3 changed files with 37 additions and 10 deletions
+5 -3
View File
@@ -36,17 +36,19 @@ class _Tee(io.TextIOBase):
sink(text)
try:
return self._real.write(text)
except OSError:
except (OSError, ValueError):
# A dead stdout — `fluksio serve` runs the engine as a child of the
# dashboard, which holds the far end of that pipe — must not fail
# the node whose output was being teed. The capture above has it,
# and there is nowhere left to report the loss to anyway.
# and there is nowhere left to report the loss to anyway. A closed
# one (ValueError) is the same at interpreter exit, when whatever
# was wrapped — pytest's capture, say — has been closed first.
return len(text)
def flush(self) -> None:
try:
self._real.flush()
except OSError:
except (OSError, ValueError):
pass
def isatty(self) -> bool: