def test_autocompletes_global_and_service_args(index_data):
    index_data['aws']['arguments'] = ['--query', '--debug']
    index_data['aws']['commands'] = ['ec2']
    index_data['aws']['children'] = {
        'ec2': {
            'arguments': ['--query-ec2', '--instance-id'],
            'commands': [],
            'children': {},
        }
    }
    completer = AWSCLIModelCompleter(index_data)
    c = completer.autocomplete
    c('e')
    c('ec')
    c('ec2')
    c('ec2 ')
    c('ec2 -')
    c('ec2 --')
    assert c('ec2 --q') in ['--query', '--query-ec2']
dataset/ETHPy150Open awslabs/aws-shell/tests/unit/test_autocomplete.py/test_autocompletes_global_and_service_args/operator `==` -> `in`