from solution import parse_duration CASES = [ (('1h30m',), 5400), (('90m',), 5400), ] failed = 0 for args, want in CASES: got = parse_duration(*args) status = 'ok' if got == want else 'FAIL' failed += status == 'FAIL' print(status, 'parse_duration', args, '->', repr(got), '(expected', repr(want) + ')') print('passed', len(CASES) - failed, 'of', len(CASES))