MCPcopy Create free account
hub / github.com/python-pendulum/pendulum / test_skipped_time_with_pre_rule

Function test_skipped_time_with_pre_rule

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

Source from the content-addressed store, hash-verified

48
49
50def test_skipped_time_with_pre_rule():
51 dt = datetime(2013, 3, 31, 2, 30, 45, 123456, fold=0)
52 tz = timezone("Europe/Paris")
53 dt = tz.convert(dt)
54
55 assert dt.year == 2013
56 assert dt.month == 3
57 assert dt.day == 31
58 assert dt.hour == 1
59 assert dt.minute == 30
60 assert dt.second == 45
61 assert dt.microsecond == 123456
62 assert dt.tzinfo.name == "Europe/Paris"
63 assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=3600)
64 assert dt.tzinfo.dst(dt) == timedelta()
65
66
67def test_skipped_time_with_post_rule():

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