8000 gh-119205: revert unnecessary changes · python/cpython@241e634 · GitHub
[go: up one dir, main page]

Skip to content

Commit 241e634

Browse files
committed
gh-119205: revert unnecessary changes
1 parent 22cdb57 commit 241e634

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

Lib/test/test_pyrepl.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
readline = import_module(" 8000 readline")
2323

2424
from _pyrepl.console import Console, Event
25-
from _pyrepl.readline import ReadlineAlikeReader, ReadlineConfig, _ReadlineWrapper
25+
from _pyrepl.readline import ReadlineAlikeReader, ReadlineConfig
2626
from _pyrepl.simple_interact import _strip_final_indent
2727
from _pyrepl.unix_eventqueue import EventQueue
2828
from _pyrepl.input import KeymapTranslator
@@ -279,7 +279,7 @@ def test_cursor_position_double_width_characters_move_up(self):
279279

280280
# fmt: off
281281
code = (
282-
f"{for_loop}\n"
282+
f"{for_loop}\n"
283283
" ' 可口可乐; 可口可樂'"
284284
)
285285
# fmt: on
@@ -302,7 +302,7 @@ def test_cursor_position_double_width_characters_move_up_down(self):
302302

303303
# fmt: off
304304
code = (
305-
f"{for_loop}\n"
305+
f"{for_loop}\n"
306306
" ' 可口可乐; 可口可樂'"
307307
)
308308
# fmt: on
@@ -349,8 +349,8 @@ def test_cursor_position_move_up_to_eol(self):
349349
code = (
350350
f"{first_line}\n"
351351
f"{second_line}\n"
352-
" h\n"
353-
" hel"
352+
" h\n"
353+
" hel"
354354
)
355355
# fmt: on
356356

@@ -382,7 +382,7 @@ def test_cursor_position_move_down_to_eol(self):
382382
"for _ in _:\n"
383383
" hello\n"
384384
" h\n"
385-
f"{last_line}"
385+
f"{last_line}"
386386
)
387387
# fmt: on
388388

@@ -655,6 +655,7 @@ def test_func(self):
655655
self.assertEqual(output[0], "dummy.test_func.")
656656
self.assertEqual(f.getvalue(), "")
657657

658+
658659
@patch("_pyrepl.curses.tigetstr", lambda x: b"")
659660
class TestUnivEventQueue(TestCase):
660661
def setUp(self):
@@ -930,24 +931,24 @@ def assert_screen_equals(self, reader, expected):
930931
def test_calc_screen_wrap_simple(self):
931932
events = code_to_events(10 * "a")
932933
reader, _ = handle_events_narrow_console(events)
933-
self.assert_screen_equals(reader, f"{9 * "a"}\\\na")
934+
self.assert_screen_equals(reader, f"{9*"a"}\\\na")
934935

935936
def test_calc_screen_wrap_wide_characters(self):
936937
events = code_to_events(8 * "a" + "樂")
937938
reader, _ = handle_events_narrow_console(events)
938-
self.assert_screen_equals(reader, f"{8 * "a"}\\\n樂")
939+
self.assert_screen_equals(reader, f"{8*"a"}\\\n樂")
939940

940941
def test_calc_screen_wrap_three_lines(self):
941942
events = code_to_events(20 * "a")
942943
reader, _ = handle_events_narrow_console(events)
943-
self.assert_screen_equals(reader, f"{9 * "a"}\\\n{9 * "a"}\\\naa")
944+
self.assert_screen_equals(reader, f"{9*"a"}\\\n{9*"a"}\\\naa")
944945

945946
def test_calc_screen_wrap_three_lines_mixed_character(self):
946947
# fmt: off
947948
code = (
948949
"def f():\n"
949-
f" {8 * "a"}\n"
950-
f" {5 * "樂"}"
950+
f" {8*"a"}\n"
951+
f" {5*"樂"}"
951952
)
952953
# fmt: on
953954

@@ -957,9 +958,9 @@ def test_calc_screen_wrap_three_lines_mixed_character(self):
957958
# fmt: off
958959
self.assert_screen_equals(reader, (
959960
"def f():\n"
960-
f" {7 * "a"}\\\n"
961+
f" {7*"a"}\\\n"
961962
"a\n"
962-
f" {3 * "樂"}\\\n"
963+
f" {3*"樂"}\\\n"
963964
"樂樂"
964965
))
965966
# fmt: on
@@ -992,7 +993,7 @@ def test_calc_screen_backspace_in_second_line_after_wrap(self):
992993
],
993994
)
994995
reader, _ = handle_events_narrow_console(events)
995-
self.assert_screen_equals(reader, f"{9 * "a"}\\\na")
996+
self.assert_screen_equals(reader, f"{9*"a"}\\\na")
996997

997998
def test_setpos_for_xy_simple(self):
998999
events = code_to_events("11+11")

0 commit comments

Comments
 (0)
0