import re


def get_cases(test_suite, test_name_regex):
    """
    Return case list which name matched regex.
    """
    cases = []
    for test_case_name in dir(test_suite):
        test_case = getattr(test_suite, test_case_name)
        if callable(test_case) and re.match(test_name_regex, test_case_name):
            cases.append(test_case_name)

    return cases