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

Method test_parse_unambiguous_nonexistent_local

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

parseFunction · 0.90
TZEnvContextClass · 0.85
tznameMethod · 0.45

Tested by

no test coverage detected