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

Function test_basic_convert

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

Source from the content-addressed store, hash-verified

26
27
28def test_basic_convert():
29 dt = datetime(2016, 6, 1, 12, 34, 56, 123456, fold=1)
30 tz = timezone("Europe/Paris")
31 dt = tz.convert(dt)
32
33 assert dt.year == 2016
34 assert dt.month == 6
35 assert dt.day == 1
36 assert dt.hour == 12
37 assert dt.minute == 34
38 assert dt.second == 56
39 assert dt.microsecond == 123456
40 assert dt.tzinfo.name == "Europe/Paris"
41 assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=7200)
42 assert dt.tzinfo.dst(dt) == timedelta(seconds=3600)
43
44
45def test_equality():

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…