Skip to content

Commit 546687f

Browse files
[3.13] Disable inputrc in test_pyrepl basic REPL output test (GH-157938)
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. (cherry picked from commit d5dede7) Co-authored-by: Zachary Ware <zach@python.org>
1 parent aa0279b commit 546687f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Lib/test/test_pyrepl/test_pyrepl.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,8 @@ def test_no_newline(self):
14181418
env = os.environ.copy()
14191419
env.pop("PYTHON_BASIC_REPL", "")
14201420
env["PYTHON_BASIC_REPL"] = "1"
1421+
# Ensure user's .inputrc doesn't interfere with basic REPL output
1422+
env["INPUTRC"] = "/dev/null"
14211423

14221424
commands = "print('Something pretty long', end='')\nexit()\n"
14231425
expected_output_sequence = "Something pretty long>>> exit()"

0 commit comments

Comments
 (0)