@@ -86,9 +86,48 @@ def test_function_name_completion(completer, complete_event):
86
86
position = len ('SELECT MA' )
87
87
result = completer .get_completions (
88
88
Document (text = text , cursor_position = position ), complete_event )
89
- assert list (result ) == list ([Completion (text = 'MAX' , start_position = - 2 ),
90
- Completion (text = 'MASTER' , start_position = - 2 ),
91
- ])
89
+ assert list (result ) == list ([
90
+ Completion (text = 'MAKEDATE' , start_position = - 2 ),
91
+ Completion (text = 'MAKETIME' , start_position = - 2 ),
92
+ Completion (text = 'MAKE_SET' , start_position = - 2 ),
93
+ Completion (text = 'MASTER_POS_WAIT' , start_position = - 2 ),
94
+ Completion (text = 'MAX' , start_position = - 2 ),
95
+ Completion (text = 'MASTER' , start_position = - 2 ),
96
+ Completion (text = 'MASTER_AUTO_POSITION' , start_position = - 2 ),
97
+ Completion (text = 'MASTER_BIND' , start_position = - 2 ),
98
+ Completion (text = 'MASTER_COMPRESSION_ALGORITHMS' , start_position = - 2 ),
99
+ Completion (text = 'MASTER_CONNECT_RETRY' , start_position = - 2 ),
100
+ Completion (text = 'MASTER_DELAY' , start_position = - 2 ),
101
+ Completion (text = 'MASTER_HEARTBEAT_PERIOD' , start_position = - 2 ),
102
+ Completion (text = 'MASTER_HOST' , start_position = - 2 ),
103
+ Completion (text = 'MASTER_LOG_FILE' , start_position = - 2 ),
104
+ Completion (text = 'MASTER_LOG_POS' , start_position = - 2 ),
105
+ Completion (text = 'MASTER_PASSWORD' , start_position = - 2 ),
106
+ Completion (text = 'MASTER_PORT' , start_position = - 2 ),
107
+ Completion (text = 'MASTER_PUBLIC_KEY_PATH' , start_position = - 2 ),
108
+ Completion (text = 'MASTER_RETRY_COUNT' , start_position = - 2 ),
109
+ Completion (text = 'MASTER_SERVER_ID' , start_position = - 2 ),
110
+ Completion (text = 'MASTER_SSL' , start_position = - 2 ),
111
+ Completion (text = 'MASTER_SSL_CA' , start_position = - 2 ),
112
+ Completion (text = 'MASTER_SSL_CAPATH' , start_position = - 2 ),
113
+ Completion (text = 'MASTER_SSL_CERT' , start_position = - 2 ),
114
+ Completion (text = 'MASTER_SSL_CIPHER' , start_position = - 2 ),
115
+ Completion (text = 'MASTER_SSL_CRL' , start_position = - 2 ),
116
+ Completion (text = 'MASTER_SSL_CRLPATH' , start_position = - 2 ),
117
+ Completion (text = 'MASTER_SSL_KEY' , start_position = - 2 ),
118
+ Completion (text = 'MASTER_SSL_VERIFY_SERVER_CERT' , start_position = - 2 ),
119
+ Completion (text = 'MASTER_TLS_CIPHERSUITES' , start_position = - 2 ),
120
+ Completion (text = 'MASTER_TLS_VERSION' , start_position = - 2 ),
121
+ Completion (text = 'MASTER_USER' , start_position = - 2 ),
122
+ Completion (text = 'MASTER_ZSTD_COMPRESSION_LEVEL' , start_position = - 2 ),
123
+ Completion (text = 'MATCH' , start_position = - 2 ),
124
+ Completion (text = 'MAXVALUE' , start_position = - 2 ),
125
+ Completion (text = 'MAX_CONNECTIONS_PER_HOUR' , start_position = - 2 ),
126
+ Completion (text = 'MAX_QUERIES_PER_HOUR' , start_position = - 2 ),
127
+ Completion (text = 'MAX_ROWS' , start_position = - 2 ),
128
+ Completion (text = 'MAX_SIZE' , start_position = - 2 ),
129
+ Completion (text = 'MAX_UPDATES_PER_HOUR' , start_position = - 2 ),
130
+ Completion (text = 'MAX_USER_CONNECTIONS' , start_position = - 2 )])
92
131
93
132
94
133
def test_suggested_column_names (completer , complete_event ):
@@ -111,9 +150,9 @@ def test_suggested_column_names(completer, complete_event):
111
150
Completion (text = 'id' , start_position = 0 ),
112
151
Completion (text = 'last_name' , start_position = 0 ),
113
152
] +
114
- list (map (Completion , completer .functions )) +
153
+ list (map (Completion , sorted ( completer .functions ) )) +
115
154
[Completion (text = 'users' , start_position = 0 )] +
116
- list (map (Completion , completer .keywords )))
155
+ list (map (Completion , sorted ( completer .keywords ) )))
117
156
118
157
119
158
def test_suggested_column_names_in_function (completer , complete_event ):
@@ -200,9 +239,9 @@ def test_suggested_multiple_column_names(completer, complete_event):
200
239
Completion (text = 'first_name' , start_position = 0 ),
201
240
Completion (text = 'id' , start_position = 0 ),
202
241
Completion (text = 'last_name' , start_position = 0 )] +
203
- list (map (Completion , completer .functions )) +
242
+ list (map (Completion , sorted ( completer .functions ) )) +
204
243
[Completion (text = 'u' , start_position = 0 )] +
205
- list (map (Completion , completer .keywords )))
244
+ list (map (Completion , sorted ( completer .keywords ) )))
206
245
207
246
208
247
def test_suggested_multiple_column_names_with_alias (completer , complete_event ):
@@ -321,9 +360,9 @@ def test_auto_escaped_col_names(completer, complete_event):
321
360
Completion (text = '`insert`' , start_position = 0 ),
322
361
Completion (text = 'id' , start_position = 0 ),
323
362
] + \
324
- list (map (Completion , completer .functions )) + \
363
+ list (map (Completion , sorted ( completer .functions ) )) + \
325
364
[Completion (text = '`select`' , start_position = 0 )] + \
326
- list (map (Completion , completer .keywords ))
365
+ list (map (Completion , sorted ( completer .keywords ) ))
327
366
328
367
329
368
def test_un_escaped_table_names (completer , complete_event ):
@@ -338,9 +377,9 @@ def test_un_escaped_table_names(completer, complete_event):
338
377
Completion (text = '`insert`' , start_position = 0 ),
339
378
Completion (text = 'id' , start_position = 0 ),
340
379
] +
341
- list (map (Completion , completer .functions )) +
380
+ list (map (Completion , sorted ( completer .functions ) )) +
342
381
[Completion (text = 'réveillé' , start_position = 0 )] +
343
- list (map (Completion , completer .keywords )))
382
+ list (map (Completion , sorted ( completer .keywords ) )))
344
383
345
384
346
385
def dummy_list_path (dir_name ):
0 commit comments