We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c8c946 commit 6c11ea5Copy full SHA for 6c11ea5
1 file changed
tests/test_conversions.py
@@ -43,8 +43,12 @@ def test_parse_duration():
43
assert parse_duration('1h') == relativedelta(hours=1)
44
assert parse_duration('1hrs, 5mins') == relativedelta(hours=1, minutes=5)
45
assert parse_duration('60 seconds') == relativedelta(minutes=1)
46
+ assert parse_duration('1 week', dt.timedelta) == dt.timedelta(days=7)
47
+ assert parse_duration('1 week, 2 days', dt.timedelta) == dt.timedelta(days=9)
48
with pytest.raises(ValueError):
49
parse_duration('foo')
50
+ with pytest.raises(ValueError):
51
+ parse_duration('1 month', dt.timedelta)
52
53
54
def test_parse_timestamp():
0 commit comments