Skip to content

Commit 50188d3

Browse files
committed
Fix test_right_arrow_end_of_line test
1 parent 62b3577 commit 50188d3

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
@@ -238,13 +238,15 @@ def test_right_arrow_end_of_line(self):
238238
events = itertools.chain(
239239
code_to_events("11+11"),
240240
[
241+
# Go left first to avoid end of buffer error.
242+
Event(evt="key", data="left", raw=bytearray(b"\x1bOD")),
241243
Event(evt="key", data="right", raw=bytearray(b"\x1bOC")),
242244
],
243245
)
244246

245247
reader, console = handle_all_events(events)
246248
self.assertEqual(reader.cxy, (5, 0))
247-
console.move_cursor.assert_called_once_with(5, 0)
249+
console.move_cursor.assert_called_with(5, 0)
248250

249251
def test_cursor_position_simple_character(self):
250252
events = itertools.chain(code_to_events("k"))

0 commit comments

Comments
 (0)