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

Function test_in_timezone

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

Source from the content-addressed store, hash-verified

6
7
8def test_in_timezone():
9 d = pendulum.datetime(2015, 1, 15, 18, 15, 34)
10 now = pendulum.datetime(2015, 1, 15, 18, 15, 34)
11 assert d.timezone_name == "UTC"
12 assert_datetime(d, now.year, now.month, now.day, now.hour, now.minute)
13
14 d = d.in_timezone("Europe/Paris")
15 assert d.timezone_name == "Europe/Paris"
16 assert_datetime(d, now.year, now.month, now.day, now.hour + 1, now.minute)
17
18
19def test_in_tz():

Callers

nothing calls this directly

Calls 3

assert_datetimeFunction · 0.90
in_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…