https://github.com/python/cpython/commit/d5dede7442ebb4a05cff5309697fb5dcba3d5297
commit: d5dede7442ebb4a05cff5309697fb5dcba3d5297
branch: main
author: Zachary Ware <[email protected]>
committer: zware <[email protected]>
date: 2026-09-21T21:01:58-05:00
summary:
Disable inputrc in test_pyrepl basic REPL output test (GH-157827)
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.
files:
M Lib/test/test_pyrepl/test_pyrepl.py
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()"
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]