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

Method test_parse_unambiguous_nonexistent_local

tests/test_parser.py:891–899  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

889@pytest.mark.skipif(IS_WIN, reason="Windows does not use TZ var")
890class TestTZVar(object):
891 def test_parse_unambiguous_nonexistent_local(self):
892 # When dates are specified "EST" even when they should be "EDT" in the
893 # local time zone, we should still assign the local time zone
894 with TZEnvContext('EST+5EDT,M3.2.0/2,M11.1.0/2'):
895 dt_exp = datetime(2011, 8, 1, 12, 30, tzinfo=tz.tzlocal())
896 dt = parse('2011-08-01T12:30 EST')
897
898 assert dt.tzname() == 'EDT'
899 assert dt == dt_exp
900
901 def test_tzlocal_in_gmt(self):
902 # GH #318

Callers

nothing calls this directly

Calls 3

parseFunction · 0.90
TZEnvContextClass · 0.85
tznameMethod · 0.45

Tested by

no test coverage detected