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

Function test_parse_now

tests/test_parsing.py:130–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129
130def test_parse_now() -> None:
131 assert pendulum.parse("now").timezone_name == "UTC"
132 assert (
133 pendulum.parse("now", tz="America/Los_Angeles").timezone_name
134 == "America/Los_Angeles"
135 )
136
137 dt = pendulum.parse("now", tz="local")
138 assert dt.timezone_name == "America/Toronto"
139
140 mock_now = pendulum.yesterday()
141
142 with pendulum.travel_to(mock_now, freeze=True):
143 assert pendulum.parse("now") == mock_now
144
145
146def test_parse_with_utc_timezone() -> None:

Callers

nothing calls this directly

Calls 2

parseMethod · 0.80
travel_toMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…