File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 1616 captured_stdin ,
1717 force_not_colorized_test_class ,
1818 requires_subprocess ,
19+ verbose ,
1920)
2021
2122
@@ -289,15 +290,23 @@ def test_complete_no_input(self):
289290 """ )
290291 input_ = b"\t \t .quit\n "
291292 output = run_pty (script , input_ , env = {** os .environ , "NO_COLOR" : "1" })
292- lines = output .decode ().splitlines ()
293- indices = [
294- i for i , line in enumerate (lines )
295- if line .startswith (self .PS1 )
296- ]
297- self .assertEqual (len (indices ), 2 )
298- start , end = indices
299- candidates = [l .strip () for l in lines [start + 1 :end ]]
300- self .assertEqual (candidates , sorted (SQLITE_KEYWORDS ))
293+ try :
294+ lines = output .decode ().splitlines ()
295+ indices = [
296+ i for i , line in enumerate (lines )
297+ if line .startswith (self .PS1 )
298+ ]
299+ self .assertEqual (len (indices ), 3 )
300+ start , end = indices
301+ candidates = [l .strip () for l in lines [start + 1 :end ]]
302+ self .assertEqual (candidates , sorted (SQLITE_KEYWORDS ))
303+ except :
304+ if verbose :
305+ print (' PTY output: ' .center (30 , '-' ))
306+ print (output .decode (errors = 'replace' ))
307+ print (' end PTY output ' .center (30 , '-' ))
308+ raise
309+
301310
302311
303312if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments