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

Function test_parse_tzinfos_fold

tests/test_parser.py:927–937  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

925
926
927def test_parse_tzinfos_fold():
928 NYC = tz.gettz('America/New_York')
929 tzinfos = {'EST': NYC, 'EDT': NYC}
930
931 dt_exp = tz.enfold(datetime(2011, 11, 6, 1, 30, tzinfo=NYC), fold=1)
932 dt = parse('2011-11-06T01:30 EST', tzinfos=tzinfos)
933
934 assert dt == dt_exp
935 assert dt.tzinfo is dt_exp.tzinfo
936 assert getattr(dt, 'fold') == getattr(dt_exp, 'fold')
937 assert dt.astimezone(tz.UTC) == dt_exp.astimezone(tz.UTC)
938
939
940@pytest.mark.parametrize('dtstr,dt', [

Callers

nothing calls this directly

Calls 2

parseFunction · 0.90
gettzMethod · 0.45

Tested by

no test coverage detected