MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / test_parse_duration

Function test_parse_duration

tests/test_parsing.py:82–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81
82def test_parse_duration() -> None:
83 text = "P2Y3M4DT5H6M7S"
84
85 duration = pendulum.parse(text)
86
87 assert isinstance(duration, pendulum.Duration)
88 assert_duration(duration, 2, 3, 0, 4, 5, 6, 7)
89
90 text = "P2W"
91
92 duration = pendulum.parse(text)
93
94 assert isinstance(duration, pendulum.Duration)
95 assert_duration(duration, 0, 0, 2, 0, 0, 0, 0)
96
97
98def test_parse_interval() -> None:

Callers

nothing calls this directly

Calls 2

assert_durationFunction · 0.90
parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…