Skip to content

Commit

Permalink
add input test
Browse files Browse the repository at this point in the history
  • Loading branch information
FullteaR committed Jan 5, 2025
1 parent b648e7a commit 830e8c9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Lib/test/test_pyrepl/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,17 @@ def test_input_func_with_empty_prompt(self):
[
Event(evt="key", data='\n', raw=bytearray(b'\n')),
],
code_to_events("abcde")
code_to_events("abcde"),
[
Event(evt="key", data='\n', raw=bytearray(b'\n')),
],
)
reader, _ = handle_all_events(events)
self.assert_screen_equals(reader, 9 * "a")

expected = (
"input()\n"
"abcde\n"
"'abcde'\n"
)
self.assert_screen_equals(reader, expected)

0 comments on commit 830e8c9

Please sign in to comment.