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

Function test_astimezone

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

Source from the content-addressed store, hash-verified

28
29
30def test_astimezone():
31 d = pendulum.datetime(2015, 1, 15, 18, 15, 34)
32 now = pendulum.datetime(2015, 1, 15, 18, 15, 34)
33 assert d.timezone_name == "UTC"
34 assert_datetime(d, now.year, now.month, now.day, now.hour, now.minute)
35
36 d = d.astimezone(pendulum.timezone("Europe/Paris"))
37 assert d.timezone_name == "Europe/Paris"
38 assert_datetime(d, now.year, now.month, now.day, now.hour + 1, now.minute)

Callers

nothing calls this directly

Calls 4

assert_datetimeFunction · 0.90
astimezoneMethod · 0.80
timezoneMethod · 0.80
datetimeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…