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

Function test_repeated_time_pre_rule

tests/tz/test_timezone.py:108–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106
107
108def test_repeated_time_pre_rule():
109 dt = datetime(2013, 10, 27, 2, 30, 45, 123456, fold=0)
110 tz = timezone("Europe/Paris")
111 dt = tz.convert(dt)
112
113 assert dt.year == 2013
114 assert dt.month == 10
115 assert dt.day == 27
116 assert dt.hour == 2
117 assert dt.minute == 30
118 assert dt.second == 45
119 assert dt.microsecond == 123456
120 assert dt.tzinfo.name == "Europe/Paris"
121 assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=7200)
122 assert dt.tzinfo.dst(dt) == timedelta(seconds=3600)
123
124
125def test_repeated_time_with_error():

Callers

nothing calls this directly

Calls 5

timezoneFunction · 0.90
datetimeFunction · 0.85
utcoffsetMethod · 0.80
dstMethod · 0.80
convertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…