From ab65d4fdf89c528525b4cb87aa037b4ad441590b Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 19 Sep 2026 16:50:59 -0500 Subject: [PATCH] Disable inputrc in test_pyrepl basic REPL output test Specifically, `test_no_newline` would fail if the user's `~/.inputrc` sets `editing-mode vi`, which adds `(ins)` for "insert mode" to the beginning of the prompt. --- Lib/test/test_pyrepl/test_pyrepl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 7cc178f19df6f9d..1e0f99f5f97c83a 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -2431,6 +2431,8 @@ def test_no_newline(self): env = os.environ.copy() env.pop("PYTHON_BASIC_REPL", "") env["PYTHON_BASIC_REPL"] = "1" + # Ensure user's .inputrc doesn't interfere with basic REPL output + env["INPUTRC"] = "/dev/null" commands = "print('Something pretty long', end='')\nexit()\n" expected_output_sequence = "Something pretty long>>> exit()"