Skip to content

Commit 62b3577

Browse files
committed
Fix test_down_arrow_end_of_input
1 parent 9415f6b commit 62b3577

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,15 @@ def test_down_arrow_end_of_input(self):
212212
events = itertools.chain(
213213
code_to_events(code),
214214
[
215+
# Go left first to avoid end of buffer error.
216+
Event(evt="key", data="left", raw=bytearray(b"\x1bOD")),
215217
Event(evt="key", data="down", raw=bytearray(b"\x1bOB")),
216218
],
217219
)
218220

219221
reader, console = handle_all_events(events)
220222
self.assertEqual(reader.cxy, (0, 2))
221-
console.move_cursor.assert_called_once_with(0, 2)
223+
console.move_cursor.assert_called_with(0, 2)
222224

223225
def test_left_arrow_simple(self):
224226
events = itertools.chain(

0 commit comments

Comments
 (0)