Download data/software-parse_duration-2/test_solution.py from stoiclion/agent-workbench: direct link, hf CLI and curl.
- Browser
- Download file 385 Bytes
-
https://huggingface.co/datasets/stoiclion/agent-workbench/resolve/main/data/software-parse_duration-2/test_solution.py
- Command line
-
hf download hf://datasets/stoiclion/agent-workbench/data/software-parse_duration-2/test_solution.py
-
curl -L -o test_solution.py https://huggingface.co/datasets/stoiclion/agent-workbench/resolve/main/data/software-parse_duration-2/test_solution.py
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)) | |