def test_parse_invalid_timedelta(): with expect.raises(ValueError, "Invalid 'frequency' value"): parse_timedelta("1 k")
def test_parse_timedelta(string, dt): expect(parse_timedelta(string)) == dt