<filename>CaseConverter/test.py<gh_stars>0
from printer import Color, danger, success, info, format_table
from converter import *


def resolve(function, value, expected):
    try:
        result = function(value)
    except ValueError as e:
        result = 'ValueError'
    except NotImplementedError as e:
        return e.message, Color.BLUE

    if result == expected:
        return result, Color.GREEN
    return result, Color.RED


def execute(tests):
    for i, line in enumerate(tests):
        result, state_code = resolve(line[0], line[1], line[2])
        tests[i] = [line[0].__name__, line[1], line[2], result, state_code]


def repport(tests, index):
    errors = 0
    ok = 0
    missing = 0
    for line in tests:
        if line[index] == 0:
            errors += 1
        elif line[index] == 1:
            ok += 1
        elif line[index] == 3:
            missing += 1
    print "Repport:\n"
    print "- {:>12} Methods not yet implemented".format(info(missing))
    print "- {:>12} Methods failing".format(danger(errors))
    print "- {:>12} Methods doing ok".format(success(ok))
    print

values = [
    'ThisWasPascal',
    'thisWasCamel',
    'this_was_snake',
    'THIS_WAS_COBOL',
    'This_Was_Weird',
    'this-was-kebab',
    'THIS-WAS-TRAIN',
    'This-Was-Weird',
    'this has spaces',
    'this-IsInvalid',
    'This_IsInvalid'
]

tests = [
    [camel_to_cobol, 'ThisWasPascal', 'ValueError'],
    [camel_to_kebab, 'ThisWasPascal', 'ValueError'],
    [camel_to_pascal, 'ThisWasPascal', 'ValueError'],
    [camel_to_snake, 'ThisWasPascal', 'ValueError'],
    [camel_to_train, 'ThisWasPascal', 'ValueError'],
    [cobol_to_camel, 'ThisWasPascal', 'ValueError'],
    [cobol_to_kebab, 'ThisWasPascal', 'ValueError'],
    [cobol_to_pascal, 'ThisWasPascal', 'ValueError'],
    [cobol_to_snake, 'ThisWasPascal', 'ValueError'],
    [cobol_to_train, 'ThisWasPascal', 'ValueError'],
    [kebab_to_camel, 'ThisWasPascal', 'ValueError'],
    [kebab_to_cobol, 'ThisWasPascal', 'ValueError'],
    [kebab_to_pascal, 'ThisWasPascal', 'ValueError'],
    [kebab_to_snake, 'ThisWasPascal', 'ValueError'],
    [kebab_to_train, 'ThisWasPascal', 'ValueError'],
    [pascal_to_camel, 'ThisWasPascal', 'thisWasPascal'],
    [pascal_to_cobol, 'ThisWasPascal', 'THIS_WAS_PASCAL'],
    [pascal_to_kebab, 'ThisWasPascal', 'this-was-pascal'],
    [pascal_to_snake, 'ThisWasPascal', 'this_was_pascal'],
    [pascal_to_train, 'ThisWasPascal', 'THIS-WAS-PASCAL'],
    [snake_to_camel, 'ThisWasPascal', 'ValueError'],
    [snake_to_cobol, 'ThisWasPascal', 'ValueError'],
    [snake_to_kebab, 'ThisWasPascal', 'ValueError'],
    [snake_to_pascal, 'ThisWasPascal', 'ValueError'],
    [snake_to_train, 'ThisWasPascal', 'ValueError'],
    [train_to_camel, 'ThisWasPascal', 'ValueError'],
    [train_to_cobol, 'ThisWasPascal', 'ValueError'],
    [train_to_kebab, 'ThisWasPascal', 'ValueError'],
    [train_to_pascal, 'ThisWasPascal', 'ValueError'],
    [train_to_snake, 'ThisWasPascal', 'ValueError'],

    [camel_to_cobol, 'thisWasCamel', 'THIS_WAS_CAMEL'],
    [camel_to_kebab, 'thisWasCamel', 'this-was-camel'],
    [camel_to_pascal, 'thisWasCamel', 'ThisWasCamel'],
    [camel_to_snake, 'thisWasCamel', 'this_was_camel'],
    [camel_to_train, 'thisWasCamel', 'THIS-WAS-CAMEL'],
    [cobol_to_camel, 'thisWasCamel', 'ValueError'],
    [cobol_to_kebab, 'thisWasCamel', 'ValueError'],
    [cobol_to_pascal, 'thisWasCamel', 'ValueError'],
    [cobol_to_snake, 'thisWasCamel', 'ValueError'],
    [cobol_to_train, 'thisWasCamel', 'ValueError'],
    [kebab_to_camel, 'thisWasCamel', 'ValueError'],
    [kebab_to_cobol, 'thisWasCamel', 'ValueError'],
    [kebab_to_pascal, 'thisWasCamel', 'ValueError'],
    [kebab_to_snake, 'thisWasCamel', 'ValueError'],
    [kebab_to_train, 'thisWasCamel', 'ValueError'],
    [pascal_to_camel, 'thisWasCamel', 'ValueError'],
    [pascal_to_cobol, 'thisWasCamel', 'ValueError'],
    [pascal_to_kebab, 'thisWasCamel', 'ValueError'],
    [pascal_to_snake, 'thisWasCamel', 'ValueError'],
    [pascal_to_train, 'thisWasCamel', 'ValueError'],
    [snake_to_camel, 'thisWasCamel', 'ValueError'],
    [snake_to_cobol, 'thisWasCamel', 'ValueError'],
    [snake_to_kebab, 'thisWasCamel', 'ValueError'],
    [snake_to_pascal, 'thisWasCamel', 'ValueError'],
    [snake_to_train, 'thisWasCamel', 'ValueError'],
    [train_to_camel, 'thisWasCamel', 'ValueError'],
    [train_to_cobol, 'thisWasCamel', 'ValueError'],
    [train_to_kebab, 'thisWasCamel', 'ValueError'],
    [train_to_pascal, 'thisWasCamel', 'ValueError'],
    [train_to_snake, 'thisWasCamel', 'ValueError'],

    [camel_to_cobol, 'this_was_snake', 'ValueError'],
    [camel_to_kebab, 'this_was_snake', 'ValueError'],
    [camel_to_pascal, 'this_was_snake', 'ValueError'],
    [camel_to_snake, 'this_was_snake', 'ValueError'],
    [camel_to_train, 'this_was_snake', 'ValueError'],
    [cobol_to_camel, 'this_was_snake', 'ValueError'],
    [cobol_to_kebab, 'this_was_snake', 'ValueError'],
    [cobol_to_pascal, 'this_was_snake', 'ValueError'],
    [cobol_to_snake, 'this_was_snake', 'ValueError'],
    [cobol_to_train, 'this_was_snake', 'ValueError'],
    [kebab_to_camel, 'this_was_snake', 'ValueError'],
    [kebab_to_cobol, 'this_was_snake', 'ValueError'],
    [kebab_to_pascal, 'this_was_snake', 'ValueError'],
    [kebab_to_snake, 'this_was_snake', 'ValueError'],
    [kebab_to_train, 'this_was_snake', 'ValueError'],
    [pascal_to_camel, 'this_was_snake', 'ValueError'],
    [pascal_to_cobol, 'this_was_snake', 'ValueError'],
    [pascal_to_kebab, 'this_was_snake', 'ValueError'],
    [pascal_to_snake, 'this_was_snake', 'ValueError'],
    [pascal_to_train, 'this_was_snake', 'ValueError'],
    [snake_to_camel, 'this_was_snake', 'thisWasSnake'],
    [snake_to_cobol, 'this_was_snake', 'THIS_WAS_SNAKE'],
    [snake_to_kebab, 'this_was_snake', 'this-was-snake'],
    [snake_to_pascal, 'this_was_snake', 'ThisWasSnake'],
    [snake_to_train, 'this_was_snake', 'THIS-WAS-SNAKE'],
    [train_to_camel, 'this_was_snake', 'ValueError'],
    [train_to_cobol, 'this_was_snake', 'ValueError'],
    [train_to_kebab, 'this_was_snake', 'ValueError'],
    [train_to_pascal, 'this_was_snake', 'ValueError'],
    [train_to_snake, 'this_was_snake', 'ValueError'],

    [camel_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [cobol_to_camel, 'THIS_WAS_COBOL', 'thisWasCobol'],
    [cobol_to_kebab, 'THIS_WAS_COBOL', 'this-was-cobol'],
    [cobol_to_pascal, 'THIS_WAS_COBOL', 'ThisWasCobol'],
    [cobol_to_snake, 'THIS_WAS_COBOL', 'this_was_cobol'],
    [cobol_to_train, 'THIS_WAS_COBOL', 'THIS-WAS-COBOL'],
    [kebab_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_snake, 'THIS_WAS_COBOL', 'ValueError'],

    [camel_to_cobol, 'This_Was_Weird', 'ValueError'],
    [camel_to_kebab, 'This_Was_Weird', 'ValueError'],
    [camel_to_pascal, 'This_Was_Weird', 'ValueError'],
    [camel_to_snake, 'This_Was_Weird', 'ValueError'],
    [camel_to_train, 'This_Was_Weird', 'ValueError'],
    [cobol_to_camel, 'This_Was_Weird', 'ValueError'],
    [cobol_to_kebab, 'This_Was_Weird', 'ValueError'],
    [cobol_to_pascal, 'This_Was_Weird', 'ValueError'],
    [cobol_to_snake, 'This_Was_Weird', 'ValueError'],
    [cobol_to_train, 'This_Was_Weird', 'ValueError'],
    [kebab_to_camel, 'This_Was_Weird', 'ValueError'],
    [kebab_to_cobol, 'This_Was_Weird', 'ValueError'],
    [kebab_to_pascal, 'This_Was_Weird', 'ValueError'],
    [kebab_to_snake, 'This_Was_Weird', 'ValueError'],
    [kebab_to_train, 'This_Was_Weird', 'ValueError'],
    [pascal_to_camel, 'This_Was_Weird', 'ValueError'],
    [pascal_to_cobol, 'This_Was_Weird', 'ValueError'],
    [pascal_to_kebab, 'This_Was_Weird', 'ValueError'],
    [pascal_to_snake, 'This_Was_Weird', 'ValueError'],
    [pascal_to_train, 'This_Was_Weird', 'ValueError'],
    [snake_to_camel, 'This_Was_Weird', 'ValueError'],
    [snake_to_cobol, 'This_Was_Weird', 'ValueError'],
    [snake_to_kebab, 'This_Was_Weird', 'ValueError'],
    [snake_to_pascal, 'This_Was_Weird', 'ValueError'],
    [snake_to_train, 'This_Was_Weird', 'ValueError'],
    [train_to_camel, 'This_Was_Weird', 'ValueError'],
    [train_to_cobol, 'This_Was_Weird', 'ValueError'],
    [train_to_kebab, 'This_Was_Weird', 'ValueError'],
    [train_to_pascal, 'This_Was_Weird', 'ValueError'],
    [train_to_snake, 'This_Was_Weird', 'ValueError'],

    [camel_to_cobol, 'this-was-kebab', 'ValueError'],
    [camel_to_kebab, 'this-was-kebab', 'ValueError'],
    [camel_to_pascal, 'this-was-kebab', 'ValueError'],
    [camel_to_snake, 'this-was-kebab', 'ValueError'],
    [camel_to_train, 'this-was-kebab', 'ValueError'],
    [cobol_to_camel, 'this-was-kebab', 'ValueError'],
    [cobol_to_kebab, 'this-was-kebab', 'ValueError'],
    [cobol_to_pascal, 'this-was-kebab', 'ValueError'],
    [cobol_to_snake, 'this-was-kebab', 'ValueError'],
    [cobol_to_train, 'this-was-kebab', 'ValueError'],
    [kebab_to_camel, 'this-was-kebab', 'thisWasKebab'],
    [kebab_to_cobol, 'this-was-kebab', 'THIS_WAS_KEBAB'],
    [kebab_to_pascal, 'this-was-kebab', 'ThisWasKebab'],
    [kebab_to_snake, 'this-was-kebab', 'this_was_kebab'],
    [kebab_to_train, 'this-was-kebab', 'THIS-WAS-KEBAB'],
    [pascal_to_camel, 'this-was-kebab', 'ValueError'],
    [pascal_to_cobol, 'this-was-kebab', 'ValueError'],
    [pascal_to_kebab, 'this-was-kebab', 'ValueError'],
    [pascal_to_snake, 'this-was-kebab', 'ValueError'],
    [pascal_to_train, 'this-was-kebab', 'ValueError'],
    [snake_to_camel, 'this-was-kebab', 'ValueError'],
    [snake_to_cobol, 'this-was-kebab', 'ValueError'],
    [snake_to_kebab, 'this-was-kebab', 'ValueError'],
    [snake_to_pascal, 'this-was-kebab', 'ValueError'],
    [snake_to_train, 'this-was-kebab', 'ValueError'],
    [train_to_camel, 'this-was-kebab', 'ValueError'],
    [train_to_cobol, 'this-was-kebab', 'ValueError'],
    [train_to_kebab, 'this-was-kebab', 'ValueError'],
    [train_to_pascal, 'this-was-kebab', 'ValueError'],
    [train_to_snake, 'this-was-kebab', 'ValueError'],

    [camel_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [train_to_camel, 'THIS-WAS-TRAIN', 'thisWasTrain'],
    [train_to_cobol, 'THIS-WAS-TRAIN', 'THIS_WAS_TRAIN'],
    [train_to_kebab, 'THIS-WAS-TRAIN', 'this-was-train'],
    [train_to_pascal, 'THIS-WAS-TRAIN', 'ThisWasTrain'],
    [train_to_snake, 'THIS-WAS-TRAIN', 'this_was_train'],

    [camel_to_cobol, 'This-Was-Weird', 'ValueError'],
    [camel_to_kebab, 'This-Was-Weird', 'ValueError'],
    [camel_to_pascal, 'This-Was-Weird', 'ValueError'],
    [camel_to_snake, 'This-Was-Weird', 'ValueError'],
    [camel_to_train, 'This-Was-Weird', 'ValueError'],
    [cobol_to_camel, 'This-Was-Weird', 'ValueError'],
    [cobol_to_kebab, 'This-Was-Weird', 'ValueError'],
    [cobol_to_pascal, 'This-Was-Weird', 'ValueError'],
    [cobol_to_snake, 'This-Was-Weird', 'ValueError'],
    [cobol_to_train, 'This-Was-Weird', 'ValueError'],
    [kebab_to_camel, 'This-Was-Weird', 'ValueError'],
    [kebab_to_cobol, 'This-Was-Weird', 'ValueError'],
    [kebab_to_pascal, 'This-Was-Weird', 'ValueError'],
    [kebab_to_snake, 'This-Was-Weird', 'ValueError'],
    [kebab_to_train, 'This-Was-Weird', 'ValueError'],
    [pascal_to_camel, 'This-Was-Weird', 'ValueError'],
    [pascal_to_cobol, 'This-Was-Weird', 'ValueError'],
    [pascal_to_kebab, 'This-Was-Weird', 'ValueError'],
    [pascal_to_snake, 'This-Was-Weird', 'ValueError'],
    [pascal_to_train, 'This-Was-Weird', 'ValueError'],
    [snake_to_camel, 'This-Was-Weird', 'ValueError'],
    [snake_to_cobol, 'This-Was-Weird', 'ValueError'],
    [snake_to_kebab, 'This-Was-Weird', 'ValueError'],
    [snake_to_pascal, 'This-Was-Weird', 'ValueError'],
    [snake_to_train, 'This-Was-Weird', 'ValueError'],
    [train_to_camel, 'This-Was-Weird', 'ValueError'],
    [train_to_cobol, 'This-Was-Weird', 'ValueError'],
    [train_to_kebab, 'This-Was-Weird', 'ValueError'],
    [train_to_pascal, 'This-Was-Weird', 'ValueError'],
    [train_to_snake, 'This-Was-Weird', 'ValueError'],

    [camel_to_cobol, 'this has spaces', 'ValueError'],
    [camel_to_kebab, 'this has spaces', 'ValueError'],
    [camel_to_pascal, 'this has spaces', 'ValueError'],
    [camel_to_snake, 'this has spaces', 'ValueError'],
    [camel_to_train, 'this has spaces', 'ValueError'],
    [cobol_to_camel, 'this has spaces', 'ValueError'],
    [cobol_to_kebab, 'this has spaces', 'ValueError'],
    [cobol_to_pascal, 'this has spaces', 'ValueError'],
    [cobol_to_snake, 'this has spaces', 'ValueError'],
    [cobol_to_train, 'this has spaces', 'ValueError'],
    [kebab_to_camel, 'this has spaces', 'ValueError'],
    [kebab_to_cobol, 'this has spaces', 'ValueError'],
    [kebab_to_pascal, 'this has spaces', 'ValueError'],
    [kebab_to_snake, 'this has spaces', 'ValueError'],
    [kebab_to_train, 'this has spaces', 'ValueError'],
    [pascal_to_camel, 'this has spaces', 'ValueError'],
    [pascal_to_cobol, 'this has spaces', 'ValueError'],
    [pascal_to_kebab, 'this has spaces', 'ValueError'],
    [pascal_to_snake, 'this has spaces', 'ValueError'],
    [pascal_to_train, 'this has spaces', 'ValueError'],
    [snake_to_camel, 'this has spaces', 'ValueError'],
    [snake_to_cobol, 'this has spaces', 'ValueError'],
    [snake_to_kebab, 'this has spaces', 'ValueError'],
    [snake_to_pascal, 'this has spaces', 'ValueError'],
    [snake_to_train, 'this has spaces', 'ValueError'],
    [train_to_camel, 'this has spaces', 'ValueError'],
    [train_to_cobol, 'this has spaces', 'ValueError'],
    [train_to_kebab, 'this has spaces', 'ValueError'],
    [train_to_pascal, 'this has spaces', 'ValueError'],
    [train_to_snake, 'this has spaces', 'ValueError'],

    [camel_to_cobol, 'this-IsInvalid', 'ValueError'],
    [camel_to_kebab, 'this-IsInvalid', 'ValueError'],
    [camel_to_pascal, 'this-IsInvalid', 'ValueError'],
    [camel_to_snake, 'this-IsInvalid', 'ValueError'],
    [camel_to_train, 'this-IsInvalid', 'ValueError'],
    [cobol_to_camel, 'this-IsInvalid', 'ValueError'],
    [cobol_to_kebab, 'this-IsInvalid', 'ValueError'],
    [cobol_to_pascal, 'this-IsInvalid', 'ValueError'],
    [cobol_to_snake, 'this-IsInvalid', 'ValueError'],
    [cobol_to_train, 'this-IsInvalid', 'ValueError'],
    [kebab_to_camel, 'this-IsInvalid', 'ValueError'],
    [kebab_to_cobol, 'this-IsInvalid', 'ValueError'],
    [kebab_to_pascal, 'this-IsInvalid', 'ValueError'],
    [kebab_to_snake, 'this-IsInvalid', 'ValueError'],
    [kebab_to_train, 'this-IsInvalid', 'ValueError'],
    [pascal_to_camel, 'this-IsInvalid', 'ValueError'],
    [pascal_to_cobol, 'this-IsInvalid', 'ValueError'],
    [pascal_to_kebab, 'this-IsInvalid', 'ValueError'],
    [pascal_to_snake, 'this-IsInvalid', 'ValueError'],
    [pascal_to_train, 'this-IsInvalid', 'ValueError'],
    [snake_to_camel, 'this-IsInvalid', 'ValueError'],
    [snake_to_cobol, 'this-IsInvalid', 'ValueError'],
    [snake_to_kebab, 'this-IsInvalid', 'ValueError'],
    [snake_to_pascal, 'this-IsInvalid', 'ValueError'],
    [snake_to_train, 'this-IsInvalid', 'ValueError'],
    [train_to_camel, 'this-IsInvalid', 'ValueError'],
    [train_to_cobol, 'this-IsInvalid', 'ValueError'],
    [train_to_kebab, 'this-IsInvalid', 'ValueError'],
    [train_to_pascal, 'this-IsInvalid', 'ValueError'],
    [train_to_snake, 'this-IsInvalid', 'ValueError'],

    [camel_to_cobol, 'This_IsInvalid', 'ValueError'],
    [camel_to_kebab, 'This_IsInvalid', 'ValueError'],
    [camel_to_pascal, 'This_IsInvalid', 'ValueError'],
    [camel_to_snake, 'This_IsInvalid', 'ValueError'],
    [camel_to_train, 'This_IsInvalid', 'ValueError'],
    [cobol_to_camel, 'This_IsInvalid', 'ValueError'],
    [cobol_to_kebab, 'This_IsInvalid', 'ValueError'],
    [cobol_to_pascal, 'This_IsInvalid', 'ValueError'],
    [cobol_to_snake, 'This_IsInvalid', 'ValueError'],
    [cobol_to_train, 'This_IsInvalid', 'ValueError'],
    [kebab_to_camel, 'This_IsInvalid', 'ValueError'],
    [kebab_to_cobol, 'This_IsInvalid', 'ValueError'],
    [kebab_to_pascal, 'This_IsInvalid', 'ValueError'],
    [kebab_to_snake, 'This_IsInvalid', 'ValueError'],
    [kebab_to_train, 'This_IsInvalid', 'ValueError'],
    [pascal_to_camel, 'This_IsInvalid', 'ValueError'],
    [pascal_to_cobol, 'This_IsInvalid', 'ValueError'],
    [pascal_to_kebab, 'This_IsInvalid', 'ValueError'],
    [pascal_to_snake, 'This_IsInvalid', 'ValueError'],
    [pascal_to_train, 'This_IsInvalid', 'ValueError'],
    [snake_to_camel, 'This_IsInvalid', 'ValueError'],
    [snake_to_cobol, 'This_IsInvalid', 'ValueError'],
    [snake_to_kebab, 'This_IsInvalid', 'ValueError'],
    [snake_to_pascal, 'This_IsInvalid', 'ValueError'],
    [snake_to_train, 'This_IsInvalid', 'ValueError'],
    [train_to_camel, 'This_IsInvalid', 'ValueError'],
    [train_to_cobol, 'This_IsInvalid', 'ValueError'],
    [train_to_kebab, 'This_IsInvalid', 'ValueError'],
    [train_to_pascal, 'This_IsInvalid', 'ValueError'],
    [train_to_snake, 'This_IsInvalid', 'ValueError'],
]

executed_tests = execute(tests)
tests.insert(0, ['Method', 'Input', 'Expected', 'Output', Color.BOLD])
color_index = 4
format_table(tests, color_index)
repport(tests, color_index)
<filename>CaseConverter/test.py<gh_stars>0
from printer import Color, danger, success, info, format_table
from converter import *


def resolve(function, value, expected):
    try:
        result = function(value)
    except ValueError as e:
        result = 'ValueError'
    except NotImplementedError as e:
        return e.message, Color.BLUE

    if result == expected:
        return result, Color.GREEN
    return result, Color.RED


def execute(tests):
    for i, line in enumerate(tests):
        result, state_code = resolve(line[0], line[1], line[2])
        tests[i] = [line[0].__name__, line[1], line[2], result, state_code]


def repport(tests, index):
    errors = 0
    ok = 0
    missing = 0
    for line in tests:
        if line[index] == 0:
            errors += 1
        elif line[index] == 1:
            ok += 1
        elif line[index] == 3:
            missing += 1
    print "Repport:\n"
    print "- {:>12} Methods not yet implemented".format(info(missing))
    print "- {:>12} Methods failing".format(danger(errors))
    print "- {:>12} Methods doing ok".format(success(ok))
    print

values = [
    'ThisWasPascal',
    'thisWasCamel',
    'this_was_snake',
    'THIS_WAS_COBOL',
    'This_Was_Weird',
    'this-was-kebab',
    'THIS-WAS-TRAIN',
    'This-Was-Weird',
    'this has spaces',
    'this-IsInvalid',
    'This_IsInvalid'
]

tests = [
    [camel_to_cobol, 'ThisWasPascal', 'ValueError'],
    [camel_to_kebab, 'ThisWasPascal', 'ValueError'],
    [camel_to_pascal, 'ThisWasPascal', 'ValueError'],
    [camel_to_snake, 'ThisWasPascal', 'ValueError'],
    [camel_to_train, 'ThisWasPascal', 'ValueError'],
    [cobol_to_camel, 'ThisWasPascal', 'ValueError'],
    [cobol_to_kebab, 'ThisWasPascal', 'ValueError'],
    [cobol_to_pascal, 'ThisWasPascal', 'ValueError'],
    [cobol_to_snake, 'ThisWasPascal', 'ValueError'],
    [cobol_to_train, 'ThisWasPascal', 'ValueError'],
    [kebab_to_camel, 'ThisWasPascal', 'ValueError'],
    [kebab_to_cobol, 'ThisWasPascal', 'ValueError'],
    [kebab_to_pascal, 'ThisWasPascal', 'ValueError'],
    [kebab_to_snake, 'ThisWasPascal', 'ValueError'],
    [kebab_to_train, 'ThisWasPascal', 'ValueError'],
    [pascal_to_camel, 'ThisWasPascal', 'thisWasPascal'],
    [pascal_to_cobol, 'ThisWasPascal', 'THIS_WAS_PASCAL'],
    [pascal_to_kebab, 'ThisWasPascal', 'this-was-pascal'],
    [pascal_to_snake, 'ThisWasPascal', 'this_was_pascal'],
    [pascal_to_train, 'ThisWasPascal', 'THIS-WAS-PASCAL'],
    [snake_to_camel, 'ThisWasPascal', 'ValueError'],
    [snake_to_cobol, 'ThisWasPascal', 'ValueError'],
    [snake_to_kebab, 'ThisWasPascal', 'ValueError'],
    [snake_to_pascal, 'ThisWasPascal', 'ValueError'],
    [snake_to_train, 'ThisWasPascal', 'ValueError'],
    [train_to_camel, 'ThisWasPascal', 'ValueError'],
    [train_to_cobol, 'ThisWasPascal', 'ValueError'],
    [train_to_kebab, 'ThisWasPascal', 'ValueError'],
    [train_to_pascal, 'ThisWasPascal', 'ValueError'],
    [train_to_snake, 'ThisWasPascal', 'ValueError'],

    [camel_to_cobol, 'thisWasCamel', 'THIS_WAS_CAMEL'],
    [camel_to_kebab, 'thisWasCamel', 'this-was-camel'],
    [camel_to_pascal, 'thisWasCamel', 'ThisWasCamel'],
    [camel_to_snake, 'thisWasCamel', 'this_was_camel'],
    [camel_to_train, 'thisWasCamel', 'THIS-WAS-CAMEL'],
    [cobol_to_camel, 'thisWasCamel', 'ValueError'],
    [cobol_to_kebab, 'thisWasCamel', 'ValueError'],
    [cobol_to_pascal, 'thisWasCamel', 'ValueError'],
    [cobol_to_snake, 'thisWasCamel', 'ValueError'],
    [cobol_to_train, 'thisWasCamel', 'ValueError'],
    [kebab_to_camel, 'thisWasCamel', 'ValueError'],
    [kebab_to_cobol, 'thisWasCamel', 'ValueError'],
    [kebab_to_pascal, 'thisWasCamel', 'ValueError'],
    [kebab_to_snake, 'thisWasCamel', 'ValueError'],
    [kebab_to_train, 'thisWasCamel', 'ValueError'],
    [pascal_to_camel, 'thisWasCamel', 'ValueError'],
    [pascal_to_cobol, 'thisWasCamel', 'ValueError'],
    [pascal_to_kebab, 'thisWasCamel', 'ValueError'],
    [pascal_to_snake, 'thisWasCamel', 'ValueError'],
    [pascal_to_train, 'thisWasCamel', 'ValueError'],
    [snake_to_camel, 'thisWasCamel', 'ValueError'],
    [snake_to_cobol, 'thisWasCamel', 'ValueError'],
    [snake_to_kebab, 'thisWasCamel', 'ValueError'],
    [snake_to_pascal, 'thisWasCamel', 'ValueError'],
    [snake_to_train, 'thisWasCamel', 'ValueError'],
    [train_to_camel, 'thisWasCamel', 'ValueError'],
    [train_to_cobol, 'thisWasCamel', 'ValueError'],
    [train_to_kebab, 'thisWasCamel', 'ValueError'],
    [train_to_pascal, 'thisWasCamel', 'ValueError'],
    [train_to_snake, 'thisWasCamel', 'ValueError'],

    [camel_to_cobol, 'this_was_snake', 'ValueError'],
    [camel_to_kebab, 'this_was_snake', 'ValueError'],
    [camel_to_pascal, 'this_was_snake', 'ValueError'],
    [camel_to_snake, 'this_was_snake', 'ValueError'],
    [camel_to_train, 'this_was_snake', 'ValueError'],
    [cobol_to_camel, 'this_was_snake', 'ValueError'],
    [cobol_to_kebab, 'this_was_snake', 'ValueError'],
    [cobol_to_pascal, 'this_was_snake', 'ValueError'],
    [cobol_to_snake, 'this_was_snake', 'ValueError'],
    [cobol_to_train, 'this_was_snake', 'ValueError'],
    [kebab_to_camel, 'this_was_snake', 'ValueError'],
    [kebab_to_cobol, 'this_was_snake', 'ValueError'],
    [kebab_to_pascal, 'this_was_snake', 'ValueError'],
    [kebab_to_snake, 'this_was_snake', 'ValueError'],
    [kebab_to_train, 'this_was_snake', 'ValueError'],
    [pascal_to_camel, 'this_was_snake', 'ValueError'],
    [pascal_to_cobol, 'this_was_snake', 'ValueError'],
    [pascal_to_kebab, 'this_was_snake', 'ValueError'],
    [pascal_to_snake, 'this_was_snake', 'ValueError'],
    [pascal_to_train, 'this_was_snake', 'ValueError'],
    [snake_to_camel, 'this_was_snake', 'thisWasSnake'],
    [snake_to_cobol, 'this_was_snake', 'THIS_WAS_SNAKE'],
    [snake_to_kebab, 'this_was_snake', 'this-was-snake'],
    [snake_to_pascal, 'this_was_snake', 'ThisWasSnake'],
    [snake_to_train, 'this_was_snake', 'THIS-WAS-SNAKE'],
    [train_to_camel, 'this_was_snake', 'ValueError'],
    [train_to_cobol, 'this_was_snake', 'ValueError'],
    [train_to_kebab, 'this_was_snake', 'ValueError'],
    [train_to_pascal, 'this_was_snake', 'ValueError'],
    [train_to_snake, 'this_was_snake', 'ValueError'],

    [camel_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [camel_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [cobol_to_camel, 'THIS_WAS_COBOL', 'thisWasCobol'],
    [cobol_to_kebab, 'THIS_WAS_COBOL', 'this-was-cobol'],
    [cobol_to_pascal, 'THIS_WAS_COBOL', 'ThisWasCobol'],
    [cobol_to_snake, 'THIS_WAS_COBOL', 'this_was_cobol'],
    [cobol_to_train, 'THIS_WAS_COBOL', 'THIS-WAS-COBOL'],
    [kebab_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [kebab_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_snake, 'THIS_WAS_COBOL', 'ValueError'],
    [pascal_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [snake_to_train, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_camel, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_cobol, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_kebab, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_pascal, 'THIS_WAS_COBOL', 'ValueError'],
    [train_to_snake, 'THIS_WAS_COBOL', 'ValueError'],

    [camel_to_cobol, 'This_Was_Weird', 'ValueError'],
    [camel_to_kebab, 'This_Was_Weird', 'ValueError'],
    [camel_to_pascal, 'This_Was_Weird', 'ValueError'],
    [camel_to_snake, 'This_Was_Weird', 'ValueError'],
    [camel_to_train, 'This_Was_Weird', 'ValueError'],
    [cobol_to_camel, 'This_Was_Weird', 'ValueError'],
    [cobol_to_kebab, 'This_Was_Weird', 'ValueError'],
    [cobol_to_pascal, 'This_Was_Weird', 'ValueError'],
    [cobol_to_snake, 'This_Was_Weird', 'ValueError'],
    [cobol_to_train, 'This_Was_Weird', 'ValueError'],
    [kebab_to_camel, 'This_Was_Weird', 'ValueError'],
    [kebab_to_cobol, 'This_Was_Weird', 'ValueError'],
    [kebab_to_pascal, 'This_Was_Weird', 'ValueError'],
    [kebab_to_snake, 'This_Was_Weird', 'ValueError'],
    [kebab_to_train, 'This_Was_Weird', 'ValueError'],
    [pascal_to_camel, 'This_Was_Weird', 'ValueError'],
    [pascal_to_cobol, 'This_Was_Weird', 'ValueError'],
    [pascal_to_kebab, 'This_Was_Weird', 'ValueError'],
    [pascal_to_snake, 'This_Was_Weird', 'ValueError'],
    [pascal_to_train, 'This_Was_Weird', 'ValueError'],
    [snake_to_camel, 'This_Was_Weird', 'ValueError'],
    [snake_to_cobol, 'This_Was_Weird', 'ValueError'],
    [snake_to_kebab, 'This_Was_Weird', 'ValueError'],
    [snake_to_pascal, 'This_Was_Weird', 'ValueError'],
    [snake_to_train, 'This_Was_Weird', 'ValueError'],
    [train_to_camel, 'This_Was_Weird', 'ValueError'],
    [train_to_cobol, 'This_Was_Weird', 'ValueError'],
    [train_to_kebab, 'This_Was_Weird', 'ValueError'],
    [train_to_pascal, 'This_Was_Weird', 'ValueError'],
    [train_to_snake, 'This_Was_Weird', 'ValueError'],

    [camel_to_cobol, 'this-was-kebab', 'ValueError'],
    [camel_to_kebab, 'this-was-kebab', 'ValueError'],
    [camel_to_pascal, 'this-was-kebab', 'ValueError'],
    [camel_to_snake, 'this-was-kebab', 'ValueError'],
    [camel_to_train, 'this-was-kebab', 'ValueError'],
    [cobol_to_camel, 'this-was-kebab', 'ValueError'],
    [cobol_to_kebab, 'this-was-kebab', 'ValueError'],
    [cobol_to_pascal, 'this-was-kebab', 'ValueError'],
    [cobol_to_snake, 'this-was-kebab', 'ValueError'],
    [cobol_to_train, 'this-was-kebab', 'ValueError'],
    [kebab_to_camel, 'this-was-kebab', 'thisWasKebab'],
    [kebab_to_cobol, 'this-was-kebab', 'THIS_WAS_KEBAB'],
    [kebab_to_pascal, 'this-was-kebab', 'ThisWasKebab'],
    [kebab_to_snake, 'this-was-kebab', 'this_was_kebab'],
    [kebab_to_train, 'this-was-kebab', 'THIS-WAS-KEBAB'],
    [pascal_to_camel, 'this-was-kebab', 'ValueError'],
    [pascal_to_cobol, 'this-was-kebab', 'ValueError'],
    [pascal_to_kebab, 'this-was-kebab', 'ValueError'],
    [pascal_to_snake, 'this-was-kebab', 'ValueError'],
    [pascal_to_train, 'this-was-kebab', 'ValueError'],
    [snake_to_camel, 'this-was-kebab', 'ValueError'],
    [snake_to_cobol, 'this-was-kebab', 'ValueError'],
    [snake_to_kebab, 'this-was-kebab', 'ValueError'],
    [snake_to_pascal, 'this-was-kebab', 'ValueError'],
    [snake_to_train, 'this-was-kebab', 'ValueError'],
    [train_to_camel, 'this-was-kebab', 'ValueError'],
    [train_to_cobol, 'this-was-kebab', 'ValueError'],
    [train_to_kebab, 'this-was-kebab', 'ValueError'],
    [train_to_pascal, 'this-was-kebab', 'ValueError'],
    [train_to_snake, 'this-was-kebab', 'ValueError'],

    [camel_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [camel_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [cobol_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [kebab_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_snake, 'THIS-WAS-TRAIN', 'ValueError'],
    [pascal_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_camel, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_cobol, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_kebab, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_pascal, 'THIS-WAS-TRAIN', 'ValueError'],
    [snake_to_train, 'THIS-WAS-TRAIN', 'ValueError'],
    [train_to_camel, 'THIS-WAS-TRAIN', 'thisWasTrain'],
    [train_to_cobol, 'THIS-WAS-TRAIN', 'THIS_WAS_TRAIN'],
    [train_to_kebab, 'THIS-WAS-TRAIN', 'this-was-train'],
    [train_to_pascal, 'THIS-WAS-TRAIN', 'ThisWasTrain'],
    [train_to_snake, 'THIS-WAS-TRAIN', 'this_was_train'],

    [camel_to_cobol, 'This-Was-Weird', 'ValueError'],
    [camel_to_kebab, 'This-Was-Weird', 'ValueError'],
    [camel_to_pascal, 'This-Was-Weird', 'ValueError'],
    [camel_to_snake, 'This-Was-Weird', 'ValueError'],
    [camel_to_train, 'This-Was-Weird', 'ValueError'],
    [cobol_to_camel, 'This-Was-Weird', 'ValueError'],
    [cobol_to_kebab, 'This-Was-Weird', 'ValueError'],
    [cobol_to_pascal, 'This-Was-Weird', 'ValueError'],
    [cobol_to_snake, 'This-Was-Weird', 'ValueError'],
    [cobol_to_train, 'This-Was-Weird', 'ValueError'],
    [kebab_to_camel, 'This-Was-Weird', 'ValueError'],
    [kebab_to_cobol, 'This-Was-Weird', 'ValueError'],
    [kebab_to_pascal, 'This-Was-Weird', 'ValueError'],
    [kebab_to_snake, 'This-Was-Weird', 'ValueError'],
    [kebab_to_train, 'This-Was-Weird', 'ValueError'],
    [pascal_to_camel, 'This-Was-Weird', 'ValueError'],
    [pascal_to_cobol, 'This-Was-Weird', 'ValueError'],
    [pascal_to_kebab, 'This-Was-Weird', 'ValueError'],
    [pascal_to_snake, 'This-Was-Weird', 'ValueError'],
    [pascal_to_train, 'This-Was-Weird', 'ValueError'],
    [snake_to_camel, 'This-Was-Weird', 'ValueError'],
    [snake_to_cobol, 'This-Was-Weird', 'ValueError'],
    [snake_to_kebab, 'This-Was-Weird', 'ValueError'],
    [snake_to_pascal, 'This-Was-Weird', 'ValueError'],
    [snake_to_train, 'This-Was-Weird', 'ValueError'],
    [train_to_camel, 'This-Was-Weird', 'ValueError'],
    [train_to_cobol, 'This-Was-Weird', 'ValueError'],
    [train_to_kebab, 'This-Was-Weird', 'ValueError'],
    [train_to_pascal, 'This-Was-Weird', 'ValueError'],
    [train_to_snake, 'This-Was-Weird', 'ValueError'],

    [camel_to_cobol, 'this has spaces', 'ValueError'],
    [camel_to_kebab, 'this has spaces', 'ValueError'],
    [camel_to_pascal, 'this has spaces', 'ValueError'],
    [camel_to_snake, 'this has spaces', 'ValueError'],
    [camel_to_train, 'this has spaces', 'ValueError'],
    [cobol_to_camel, 'this has spaces', 'ValueError'],
    [cobol_to_kebab, 'this has spaces', 'ValueError'],
    [cobol_to_pascal, 'this has spaces', 'ValueError'],
    [cobol_to_snake, 'this has spaces', 'ValueError'],
    [cobol_to_train, 'this has spaces', 'ValueError'],
    [kebab_to_camel, 'this has spaces', 'ValueError'],
    [kebab_to_cobol, 'this has spaces', 'ValueError'],
    [kebab_to_pascal, 'this has spaces', 'ValueError'],
    [kebab_to_snake, 'this has spaces', 'ValueError'],
    [kebab_to_train, 'this has spaces', 'ValueError'],
    [pascal_to_camel, 'this has spaces', 'ValueError'],
    [pascal_to_cobol, 'this has spaces', 'ValueError'],
    [pascal_to_kebab, 'this has spaces', 'ValueError'],
    [pascal_to_snake, 'this has spaces', 'ValueError'],
    [pascal_to_train, 'this has spaces', 'ValueError'],
    [snake_to_camel, 'this has spaces', 'ValueError'],
    [snake_to_cobol, 'this has spaces', 'ValueError'],
    [snake_to_kebab, 'this has spaces', 'ValueError'],
    [snake_to_pascal, 'this has spaces', 'ValueError'],
    [snake_to_train, 'this has spaces', 'ValueError'],
    [train_to_camel, 'this has spaces', 'ValueError'],
    [train_to_cobol, 'this has spaces', 'ValueError'],
    [train_to_kebab, 'this has spaces', 'ValueError'],
    [train_to_pascal, 'this has spaces', 'ValueError'],
    [train_to_snake, 'this has spaces', 'ValueError'],

    [camel_to_cobol, 'this-IsInvalid', 'ValueError'],
    [camel_to_kebab, 'this-IsInvalid', 'ValueError'],
    [camel_to_pascal, 'this-IsInvalid', 'ValueError'],
    [camel_to_snake, 'this-IsInvalid', 'ValueError'],
    [camel_to_train, 'this-IsInvalid', 'ValueError'],
    [cobol_to_camel, 'this-IsInvalid', 'ValueError'],
    [cobol_to_kebab, 'this-IsInvalid', 'ValueError'],
    [cobol_to_pascal, 'this-IsInvalid', 'ValueError'],
    [cobol_to_snake, 'this-IsInvalid', 'ValueError'],
    [cobol_to_train, 'this-IsInvalid', 'ValueError'],
    [kebab_to_camel, 'this-IsInvalid', 'ValueError'],
    [kebab_to_cobol, 'this-IsInvalid', 'ValueError'],
    [kebab_to_pascal, 'this-IsInvalid', 'ValueError'],
    [kebab_to_snake, 'this-IsInvalid', 'ValueError'],
    [kebab_to_train, 'this-IsInvalid', 'ValueError'],
    [pascal_to_camel, 'this-IsInvalid', 'ValueError'],
    [pascal_to_cobol, 'this-IsInvalid', 'ValueError'],
    [pascal_to_kebab, 'this-IsInvalid', 'ValueError'],
    [pascal_to_snake, 'this-IsInvalid', 'ValueError'],
    [pascal_to_train, 'this-IsInvalid', 'ValueError'],
    [snake_to_camel, 'this-IsInvalid', 'ValueError'],
    [snake_to_cobol, 'this-IsInvalid', 'ValueError'],
    [snake_to_kebab, 'this-IsInvalid', 'ValueError'],
    [snake_to_pascal, 'this-IsInvalid', 'ValueError'],
    [snake_to_train, 'this-IsInvalid', 'ValueError'],
    [train_to_camel, 'this-IsInvalid', 'ValueError'],
    [train_to_cobol, 'this-IsInvalid', 'ValueError'],
    [train_to_kebab, 'this-IsInvalid', 'ValueError'],
    [train_to_pascal, 'this-IsInvalid', 'ValueError'],
    [train_to_snake, 'this-IsInvalid', 'ValueError'],

    [camel_to_cobol, 'This_IsInvalid', 'ValueError'],
    [camel_to_kebab, 'This_IsInvalid', 'ValueError'],
    [camel_to_pascal, 'This_IsInvalid', 'ValueError'],
    [camel_to_snake, 'This_IsInvalid', 'ValueError'],
    [camel_to_train, 'This_IsInvalid', 'ValueError'],
    [cobol_to_camel, 'This_IsInvalid', 'ValueError'],
    [cobol_to_kebab, 'This_IsInvalid', 'ValueError'],
    [cobol_to_pascal, 'This_IsInvalid', 'ValueError'],
    [cobol_to_snake, 'This_IsInvalid', 'ValueError'],
    [cobol_to_train, 'This_IsInvalid', 'ValueError'],
    [kebab_to_camel, 'This_IsInvalid', 'ValueError'],
    [kebab_to_cobol, 'This_IsInvalid', 'ValueError'],
    [kebab_to_pascal, 'This_IsInvalid', 'ValueError'],
    [kebab_to_snake, 'This_IsInvalid', 'ValueError'],
    [kebab_to_train, 'This_IsInvalid', 'ValueError'],
    [pascal_to_camel, 'This_IsInvalid', 'ValueError'],
    [pascal_to_cobol, 'This_IsInvalid', 'ValueError'],
    [pascal_to_kebab, 'This_IsInvalid', 'ValueError'],
    [pascal_to_snake, 'This_IsInvalid', 'ValueError'],
    [pascal_to_train, 'This_IsInvalid', 'ValueError'],
    [snake_to_camel, 'This_IsInvalid', 'ValueError'],
    [snake_to_cobol, 'This_IsInvalid', 'ValueError'],
    [snake_to_kebab, 'This_IsInvalid', 'ValueError'],
    [snake_to_pascal, 'This_IsInvalid', 'ValueError'],
    [snake_to_train, 'This_IsInvalid', 'ValueError'],
    [train_to_camel, 'This_IsInvalid', 'ValueError'],
    [train_to_cobol, 'This_IsInvalid', 'ValueError'],
    [train_to_kebab, 'This_IsInvalid', 'ValueError'],
    [train_to_pascal, 'This_IsInvalid', 'ValueError'],
    [train_to_snake, 'This_IsInvalid', 'ValueError'],
]

executed_tests = execute(tests)
tests.insert(0, ['Method', 'Input', 'Expected', 'Output', Color.BOLD])
color_index = 4
format_table(tests, color_index)
repport(tests, color_index)