From 40b0b6cdb6803b0534352e4b32a4a0f7cb0cbf58 Mon Sep 17 00:00:00 2001 From: thekevinbot <248217931+thekevinbot@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:33:13 -0400 Subject: [PATCH 1/2] test(python): ask the pty REPL cases for JSON, as the rust ones already do Five cases in `repl_interactive_test.py` assert `[{"n":41}]` and have been red since `060576f` taught the CLI to lay rows out as a table when stdout is a terminal. The tests landed 55 minutes earlier and were never revisited. The table is the intended output, not a regression: `docs/reference/cli.md` documents `auto` as "table if stdout is a terminal, JSON otherwise", and `060576f` moved the rust pty cases onto `--format json` for exactly this reason -- on a terminal they would otherwise be rendering tests as well as editor tests. It added a separate case for the default it gave up. The python suite was simply missed in that pass. So the fix is the same one: the fixture opens the REPL with `--format json`. These cases are about the up arrow, the history file, `Ctrl+C`, and the continuation prompt; none of them has an opinion about layout, and the table default stays covered by `packages/rust/tests/repl_tty_e2e.rs`. This unblocks `just e2e-attest-python`, which runs the whole suite and needs exit 0 to write a receipt. --- packages/python/tests/e2e/repl_interactive_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/tests/e2e/repl_interactive_test.py b/packages/python/tests/e2e/repl_interactive_test.py index 906d3a38d..27b548e94 100644 --- a/packages/python/tests/e2e/repl_interactive_test.py +++ b/packages/python/tests/e2e/repl_interactive_test.py @@ -80,7 +80,7 @@ def _open(): workdir = tmp_path / "tree" workdir.mkdir(exist_ok=True) term = terminal( - f"sh -c 'cd {workdir} && exec {_cli()}'", + f"sh -c 'cd {workdir} && exec {_cli()} --format json'", env={ **os.environ, "XDG_DATA_HOME": str(home), From 315ac17d42d61db9a5477214ccd7df40e6f05d47 Mon Sep 17 00:00:00 2001 From: thekevinbot <248217931+thekevinbot@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:41:27 -0400 Subject: [PATCH 2/2] test(python): say why the pty REPL cases pin JSON `--format json` on a history test reads as cruft, and deleting it puts the five cases straight back on the table layout they have no opinion about. --- packages/python/tests/e2e/repl_interactive_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/python/tests/e2e/repl_interactive_test.py b/packages/python/tests/e2e/repl_interactive_test.py index 27b548e94..2d0015314 100644 --- a/packages/python/tests/e2e/repl_interactive_test.py +++ b/packages/python/tests/e2e/repl_interactive_test.py @@ -79,6 +79,7 @@ def open_repl(terminal, tmp_path, home): def _open(): workdir = tmp_path / "tree" workdir.mkdir(exist_ok=True) + # A tty gets a table; JSON keeps these cases on rows, not layout. term = terminal( f"sh -c 'cd {workdir} && exec {_cli()} --format json'", env={