#NEWLINE# def test_columns_before_keywords( completer , complete_event ) : #NEWLINE# #INDENT# sql = 'SELECT * FROM orders WHERE s' #NEWLINE# completions = completer . get_completions ( Document ( text = sql , cursor_position = len ( sql ) ) , complete_event ) #NEWLINE# column = Completion ( text = 'status' , start_position = ( - 1 ) , display_meta = 'column' ) #NEWLINE# keyword = Completion ( text = 'SELECT' , start_position = ( - 1 ) , display_meta = 'keyword' ) #NEWLINE# assert ( completions . index ( column ) < completions . index ( keyword ) )