Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa4ff42

Browse files
Test suggestion box behavior before/after#466.
1 parent66c5771 commitaa4ff42

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

‎bpython/curtsiesfrontend/repl.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,8 +1252,8 @@ def current_output_line(self, value):
12521252
self.stdin.current_line='\n'
12531253

12541254
defpaint(self,about_to_exit=False,user_quit=False,
1255-
try_preserve_history_height=40,
1256-
min_infobox_height=4):
1255+
try_preserve_history_height=30,
1256+
min_infobox_height=5):
12571257
"""Returns an array of min_height or more rows and width columns, plus
12581258
cursor position
12591259

‎bpython/test/test_curtsies_painting.py‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,19 @@ def test_lower_on_screen(self):
696696
'| k |',
697697
'| l |',
698698
'+------------------+']
699-
self.assert_paint_ignoring_formatting(screen, (0,8))
699+
# behavior before issue #466
700+
self.assert_paint_ignoring_formatting(
701+
screen,try_preserve_history_height=0)
702+
self.assert_paint_ignoring_formatting(
703+
screen,min_infobox_height=100)
704+
# behavior after issue #466
705+
screen= ['>>> abc.',
706+
'+------------------+',
707+
'| aaaaaaaaaaaaaaaa |',
708+
'| b |',
709+
'| c |',
710+
'+------------------+']
711+
self.assert_paint_ignoring_formatting(screen)
700712

701713
deftest_at_bottom_of_screen(self):
702714
self.repl.get_top_usable_line=lambda:17# two lines from bottom
@@ -720,4 +732,16 @@ def test_at_bottom_of_screen(self):
720732
'| k |',
721733
'| l |',
722734
'+------------------+']
723-
self.assert_paint_ignoring_formatting(screen, (0,8))
735+
# behavior before issue #466
736+
self.assert_paint_ignoring_formatting(
737+
screen,try_preserve_history_height=0)
738+
self.assert_paint_ignoring_formatting(
739+
screen,min_infobox_height=100)
740+
# behavior after issue #466
741+
screen= ['>>> abc.',
742+
'+------------------+',
743+
'| aaaaaaaaaaaaaaaa |',
744+
'| b |',
745+
'| c |',
746+
'+------------------+']
747+
self.assert_paint_ignoring_formatting(screen)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp