MCPcopy Create free account
hub / github.com/dateutil/dateutil / test_unambiguous

Function test_unambiguous

tests/test_tzfile.py:646–653  ·  view source on GitHub ↗

Test times that are *not* ambiguous.

(transition)

Source from the content-addressed store, hash-verified

644 "transition", _get_unambiguous_transitions(), indirect=True
645)
646def test_unambiguous(transition):
647 """Test times that are *not* ambiguous."""
648 tzi = tz.gettz(transition.key)
649 dt = transition.dt.replace(tzinfo=tzi)
650
651 assert dt.tzname() == transition.offset.tzname
652 assert dt.utcoffset() == transition.offset.utcoffset
653 assert dt.dst() == transition.offset.dst
654
655
656@as_list

Callers

nothing calls this directly

Calls 5

replaceMethod · 0.80
gettzMethod · 0.45
tznameMethod · 0.45
utcoffsetMethod · 0.45
dstMethod · 0.45

Tested by

no test coverage detected