File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -268,11 +268,12 @@ def test_completion_order(self):
268268 input = b"\t \t .quit\n "
269269 output = run_pty (script , input , env = {"NO_COLOR" : "1" })
270270 output_lines = output .decode ().splitlines ()
271- slices = tuple (i for i , line in enumerate (output_lines ) if line .startswith (self .PS1 ))
272- self .assertEqual (len (slices ), 2 )
273- start , end = slices
274- candidates = [c .strip () for c in output_lines [start + 1 : end ]]
275- self .assertEqual (sorted (candidates ), list (KEYWORDS ))
271+ indices = [i for i , line in enumerate (output_lines )
272+ if line .startswith (self .PS1 )]
273+ self .assertEqual (len (indices ), 2 )
274+ start , end = indices [0 ] + 1 , indices [1 ]
275+ candidates = list (map (str .strip , output_lines [start :end ]))
276+ self .assertEqual (candidates , list (KEYWORDS ))
276277
277278
278279if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments