mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
gh-118878: Pyrepl: show completions menu below the current line (#118939)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
5a9afe2362
commit
29caec62ee
5 changed files with 17 additions and 9 deletions
|
|
@ -850,7 +850,7 @@ class TestPyReplCompleter(TestCase):
|
|||
output = multiline_input(reader, namespace)
|
||||
self.assertEqual(output, "python")
|
||||
|
||||
def test_updown_arrow_with_completion_menu(self):
|
||||
def test_up_down_arrow_with_completion_menu(self):
|
||||
"""Up arrow in the middle of unfinished tab completion when the menu is displayed
|
||||
should work and trigger going back in history. Down arrow should subsequently
|
||||
get us back to the incomplete command."""
|
||||
|
|
@ -860,6 +860,7 @@ class TestPyReplCompleter(TestCase):
|
|||
events = itertools.chain(
|
||||
code_to_events(code),
|
||||
[
|
||||
Event(evt="key", data="down", raw=bytearray(b"\x1bOB")),
|
||||
Event(evt="key", data="up", raw=bytearray(b"\x1bOA")),
|
||||
Event(evt="key", data="down", raw=bytearray(b"\x1bOB")),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -295,8 +295,8 @@ class TestReader(TestCase):
|
|||
|
||||
actual = reader.screen
|
||||
self.assertEqual(len(actual), 2)
|
||||
self.assertEqual(actual[0].rstrip(), "itertools.accumulate(")
|
||||
self.assertEqual(actual[1], f"{code}a")
|
||||
self.assertEqual(actual[0], f"{code}a")
|
||||
self.assertEqual(actual[1].rstrip(), "itertools.accumulate(")
|
||||
|
||||
def test_key_press_on_tab_press_once(self):
|
||||
namespace = {"itertools": itertools}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue