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
{{ message }}
Repository navigation
test_cmd fails if build with editline not readline #150922
I investigated this on the latest main using a pydebug build on WSL Ubuntu 24.04 configured with --with-readline=editline, and I can reproduce the failure.
From what I found, this appears to be a test assumption rather than a cmd.py bug. GNU readline emits the completed text contiguously in the raw PTY output, while libedit redraws the line using terminal control sequences (for example \x1b[10G) and only emits the remaining suffix (ello).
The completion itself still succeeds: Cmd.default() receives the completed command and the test prints tab completion success. The failure is that the test currently expects b"hello" to appear contiguously in the raw transcript, which is not guaranteed with libedit.
Unless anyone sees a better approach, I'm planning to prepare a small test-only PR that relaxes this readline-specific assertion while preserving the behavioral check that tab completion succeeded.
Activity
zainnadeem786 commentedon Jun 28, 2026
Hi all,
I investigated this on the latest
mainusing a pydebug build on WSL Ubuntu 24.04 configured with--with-readline=editline, and I can reproduce the failure.From what I found, this appears to be a test assumption rather than a
cmd.pybug. GNU readline emits the completed text contiguously in the raw PTY output, while libedit redraws the line using terminal control sequences (for example\x1b[10G) and only emits the remaining suffix (ello).The completion itself still succeeds:
Cmd.default()receives the completed command and the test printstab completion success. The failure is that the test currently expectsb"hello"to appear contiguously in the raw transcript, which is not guaranteed with libedit.Unless anyone sees a better approach, I'm planning to prepare a small test-only PR that relaxes this readline-specific assertion while preserving the behavioral check that tab completion succeeded.
gh-150922: Fix test_cmd libedit assertion in test_bang_completion_wit…
[3.14] gh-150922: Fix test_cmd libedit assertion in test_bang_complet…
pythongh-150922: Fix test_cmd libedit assertion in test_bang_completi…
pythongh-150922: Fix test_cmd libedit assertion in test_bang_completi…
[3.15] gh-150922: Fix test_cmd libedit assertion in test_bang_complet…