@@ -71,7 +71,6 @@ def test_completion(self):
71
71
u'┌───────────────────────┐' ,
72
72
u'│ set( setattr( │' ,
73
73
u'└───────────────────────┘' ,
74
- u'' ,
75
74
u'Welcome to bpython! Press <F1> f' ]
76
75
self .assert_paint_ignoring_formatting (screen , (0 , 4 ))
77
76
@@ -126,7 +125,6 @@ def test_rewind(self):
126
125
screen = [u'>>> ' ]
127
126
self .assert_paint_ignoring_formatting (screen , (0 , 4 ))
128
127
129
- @skip ('wrong message' )
130
128
def test_rewind_contiguity_loss (self ):
131
129
self .enter ('1 + 1' )
132
130
self .enter ('2 + 2' )
@@ -182,7 +180,7 @@ def test_inconsistent_history_doesnt_happen_if_onscreen(self):
182
180
u'>>> ' ]
183
181
self .assert_paint_ignoring_formatting (screen , (2 , 4 ))
184
182
185
- @skip ('why is everything moved up? ' )
183
+ @skip ('for inconsistent history check ' )
186
184
def test_rewind_inconsistent_history (self ):
187
185
self .enter ("1 + 1" )
188
186
self .enter ("2 + 2" )
@@ -224,8 +222,7 @@ def test_clear_screen(self):
224
222
u'>>> ' , u'' , u'' , u'' , u'' ]
225
223
self .assert_paint_ignoring_formatting (screen , (4 , 4 ))
226
224
227
- @skip ('the screen moved up again!' )
228
- def test_clear_screen_while_banner_visible (self ):
225
+ def test_scroll_down_while_banner_visible (self ):
229
226
self .repl .status_bar .message ('STATUS_BAR' )
230
227
self .enter ("1 + 1" )
231
228
self .enter ("2 + 2" )
@@ -239,12 +236,25 @@ def test_clear_screen_while_banner_visible(self):
239
236
self .repl .scroll_offset += len (screen ) - self .repl .height
240
237
self .assert_paint_ignoring_formatting (screen [1 :], (3 , 4 ))
241
238
242
- self .repl .request_paint_to_clear_screen = True
239
+ def test_clear_screen_while_banner_visible (self ):
240
+ self .repl .status_bar .message ('STATUS_BAR' )
241
+ self .enter ("1 + 1" )
242
+ self .enter ("2 + 2" )
243
243
screen = [u">>> 1 + 1" ,
244
244
u'2' ,
245
+ u'>>> 2 + 2' ,
246
+ u'4' ,
247
+ u'>>> ' ,
248
+ u'STATUS_BAR ' ]
249
+ self .assert_paint_ignoring_formatting (screen , (4 , 4 ))
250
+ self .repl .scroll_offset += len (screen ) - self .repl .height
251
+ self .assert_paint_ignoring_formatting (screen [1 :], (3 , 4 ))
252
+
253
+ self .repl .request_paint_to_clear_screen = True
254
+ screen = [u'2' ,
245
255
u'>>> 2 + 2' ,
246
256
u'4' ,
247
257
u'>>> ' ,
248
258
u'' , u'' , u'' ,
249
259
u'STATUS_BAR ' ]
250
- self .assert_paint_ignoring_formatting (screen , (0 , 4 ))
260
+ self .assert_paint_ignoring_formatting (screen , (3 , 4 ))
0 commit comments