@@ -89,26 +89,32 @@ def setUp(self):
8989 self .sut .expect ("Computers.*" , timeout = 1 )
9090
9191 def test_other_input (self ):
92+ self .sut .send (key .UP )
93+ self .sut .expect (r"\+ Other\.\.\..*" , timeout = 1 )
9294 self .sut .send (key .SPACE )
95+ self .sut .expect (r": " , timeout = 1 )
9396 self .sut .send ("Hello world" )
97+ self .sut .expect (r"Hello world.*" , timeout = 1 )
9498 self .sut .send (key .ENTER )
99+ self .sut .expect (r"> X Hello world[\s\S]*\+ Other\.\.\..*" , timeout = 1 )
95100 self .sut .send (key .ENTER )
96- self .sut .expect (r"{'interests': \['Computers', 'Books', 'Hello world'\]}.* " , timeout = 1 ) # noqa
101+ self .sut .expect (r"{'interests': \['Computers', 'Books', 'Hello world'\]}" , timeout = 1 ) # noqa
97102
98103 def test_other_blank_input (self ):
104+ self .sut .send (key .UP )
105+ self .sut .expect (r"\+ Other\.\.\..*" , timeout = 1 )
99106 self .sut .send (key .SPACE )
100- self .sut .send ( key . ENTER ) # blank input
101- self .sut .send (key .SPACE )
102- self .sut .send ( "Hello world" )
107+ self .sut .expect ( r": " , timeout = 1 )
108+ self .sut .send (key .ENTER ) # blank input
109+ self .sut .expect ( r"> \+ Other\.\.\..*" , timeout = 1 )
103110 self .sut .send (key .ENTER )
104- self .sut .send (key .ENTER )
105- self .sut .expect (r"{'interests': \['Computers', 'Books', 'Hello world'\]}.*" , timeout = 1 ) # noqa
111+ self .sut .expect (r"{'interests': \['Computers', 'Books'\]}" , timeout = 1 ) # noqa
106112
107113 def test_other_select_choice (self ):
108- self .sut .send (key .DOWN )
109114 self .sut .send (key .SPACE )
115+ self .sut .expect (r"[^X] Computers.*" , timeout = 1 )
110116 self .sut .send (key .ENTER )
111- self .sut .expect (r"{'interests': \['Books'\]}.* " , timeout = 1 ) # noqa
117+ self .sut .expect (r"{'interests': \['Books'\]}" , timeout = 1 ) # noqa
112118
113119
114120@unittest .skipUnless (sys .platform .startswith ("lin" ), "Linux only" )
0 commit comments