Compare commits

...

1 Commits

Author SHA1 Message Date
teknium1
1ac64adaf9 fix(docker): don't require >0 TTY width in passthrough test
test_tty_passthrough_to_container asserted tput cols > 0, but a
script(1)-allocated PTY on a headless CI runner has a 0x0 window, so
tput cols legitimately prints 0 while the container still sees a real
TTY. The passthrough contract is already proven by the NO_TTY guard and
the numeric-output assert; the strict >0 check just made build-amd64
flaky-to-consistently-red on current runners. Loosen to >= 0.
2026-06-03 19:38:34 -07:00

View File

@@ -38,7 +38,13 @@ def test_tty_passthrough_to_container(built_image: str) -> None:
assert "NO_TTY" not in output, f"TTY passthrough failed: {output!r}"
numeric_lines = [s for s in output.split() if s.strip().isdigit()]
assert numeric_lines, f"No numeric width in output: {output!r}"
assert int(numeric_lines[0]) > 0
# The container saw a real TTY (``[ -t 1 ]`` was true, so we got a number
# rather than ``NO_TTY``) and terminfo resolved ``tput cols``. That is the
# passthrough contract this test guards. The reported width itself depends
# on the host PTY's window-size ioctl: a ``script(1)``-allocated PTY on a
# headless CI runner has a 0x0 window, so ``tput cols`` legitimately prints
# ``0`` while still being a TTY. Assert non-negative, not strictly positive.
assert int(numeric_lines[0]) >= 0
def test_tui_flag_recognized(built_image: str) -> None: