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

Function test_parse_with_timezone

tests/test_parsing.py:40–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def test_parse_with_timezone() -> None:
41 text = "2016-10-16T12:34:56.123456"
42
43 dt = pendulum.parse(text, tz="Europe/Paris")
44 assert isinstance(dt, pendulum.DateTime)
45 assert_datetime(dt, 2016, 10, 16, 12, 34, 56, 123456)
46 assert dt.tz is not None
47 assert dt.tz.name == "Europe/Paris"
48 assert dt.offset == 7200
49
50
51def test_parse_exact() -> None:

Callers

nothing calls this directly

Calls 2

assert_datetimeFunction · 0.90
parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…