def test_run_duration_fails() -> None: with pytest.raises(Exception): run_duration_string_to_seconds("17b")
def test_run_duration(s: str, expected: Optional[float]) -> None: actual = run_duration_string_to_seconds(s) assert actual == expected if expected: assert isinstance(actual, int)