diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2024-05-23 04:12:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 04:12:26 (GMT) |
commit | 9fa1b4fc466e9857210fd6e87f1cbf0c234886ee (patch) | |
tree | 94c20867abccc8fbe4e2b94cb304f0f4d3eb9963 /Lib/test/test_pyrepl/test_pyrepl.py | |
parent | dbff1f107731c76770ed279170a709a54601f8be (diff) | |
download | cpython-9fa1b4fc466e9857210fd6e87f1cbf0c234886ee.zip cpython-9fa1b4fc466e9857210fd6e87f1cbf0c234886ee.tar.gz cpython-9fa1b4fc466e9857210fd6e87f1cbf0c234886ee.tar.bz2 |
[3.13] gh-118911: Trailing whitespace in a block shouldn't prevent the user from terminating the code block (GH-119355) (#119404)
(cherry picked from commit 5091c4400c9ea2a2d1e4d89a28c9d0de2651fa6d)
Co-authored-by: Aya Elsayed <ayah.ehab11@gmail.com>
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_pyrepl/test_pyrepl.py')
-rw-r--r-- | Lib/test/test_pyrepl/test_pyrepl.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 930f6759..7dff288 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -405,12 +405,21 @@ class TestPyReplOutput(TestCase): [ Event(evt="key", data="up", raw=bytearray(b"\x1bOA")), Event(evt="key", data="up", raw=bytearray(b"\x1bOA")), - Event(evt="key", data="up", raw=bytearray(b"\x1bOA")), - Event(evt="key", data="right", raw=bytearray(b"\x1bOC")), - Event(evt="key", data="backspace", raw=bytearray(b"\x7f")), + Event(evt="key", data="left", raw=bytearray(b"\x1bOD")), + Event(evt="key", data="left", raw=bytearray(b"\x1bOD")), + Event(evt="key", data="left", raw=bytearray(b"\x1bOD")), + Event(evt="key", data="backspace", raw=bytearray(b"\x08")), Event(evt="key", data="g", raw=bytearray(b"g")), Event(evt="key", data="down", raw=bytearray(b"\x1bOB")), - Event(evt="key", data="down", raw=bytearray(b"\x1bOB")), + Event(evt="key", data="backspace", raw=bytearray(b"\x08")), + Event(evt="key", data="delete", raw=bytearray(b"\x7F")), + Event(evt="key", data="right", raw=bytearray(b"g")), + Event(evt="key", data="backspace", raw=bytearray(b"\x08")), + Event(evt="key", data="p", raw=bytearray(b"p")), + Event(evt="key", data="a", raw=bytearray(b"a")), + Event(evt="key", data="s", raw=bytearray(b"s")), + Event(evt="key", data="s", raw=bytearray(b"s")), + Event(evt="key", data="\n", raw=bytearray(b"\n")), Event(evt="key", data="\n", raw=bytearray(b"\n")), ], ) @@ -419,7 +428,7 @@ class TestPyReplOutput(TestCase): output = multiline_input(reader) self.assertEqual(output, "def f():\n ...\n ") output = multiline_input(reader) - self.assertEqual(output, "def g():\n ...\n ") + self.assertEqual(output, "def g():\n pass\n ") def test_history_navigation_with_up_arrow(self): events = itertools.chain( |