stoiclion's picture
Agent Workbench tasks and environment at e59670df
b5d1dbc verified
Raw History Blame Contribute Delete
385 Bytes
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))