Пример #1
0
def pick_test():
    choices = [
        ProfileItemView,
        ProfileListItemView,
        ProfileItemViewAdd,
        ProfileItemViewRemove,
    ]
    labels = [c.friendly_name() for c in choices]
    index = dialogs.ask_for_choice('Pick Test',
            'Choose which test you want to run', labels)
    if index is None:
        return None
    return choices[index]()
Пример #2
0
def pick_test():
    choices = [
        ProfileItemView,
        ProfileListItemView,
        ProfileItemViewAdd,
        ProfileItemViewRemove,
        ProfileItemViewResort,
    ]
    labels = [c.friendly_name() for c in choices]
    index = dialogs.ask_for_choice('Pick Test',
                                   'Choose which test you want to run', labels)
    if index is None:
        return None
    return choices[index]()