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

Function test_in_tz

tests/datetime/test_timezone.py:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def test_in_tz():
20 d = pendulum.datetime(2015, 1, 15, 18, 15, 34)
21 now = pendulum.datetime(2015, 1, 15, 18, 15, 34)
22 assert d.timezone_name == "UTC"
23 assert_datetime(d, now.year, now.month, now.day, now.hour, now.minute)
24
25 d = d.in_tz("Europe/Paris")
26 assert d.timezone_name == "Europe/Paris"
27 assert_datetime(d, now.year, now.month, now.day, now.hour + 1, now.minute)
28
29
30def test_astimezone():

Callers

nothing calls this directly

Calls 3

assert_datetimeFunction · 0.90
in_tzMethod · 0.80
datetimeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…