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

Method test_tzlocal_in_gmt

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

Source from the content-addressed store, hash-verified

899 assert dt == dt_exp
900
901 def test_tzlocal_in_gmt(self):
902 # GH #318
903 with TZEnvContext('GMT0BST,M3.5.0,M10.5.0'):
904 # This is an imaginary datetime in tz.tzlocal() but should still
905 # parse using the GMT-as-alias-for-UTC rule
906 dt = parse('2004-05-01T12:00 GMT')
907 dt_exp = datetime(2004, 5, 1, 12, tzinfo=tz.UTC)
908
909 assert dt == dt_exp
910
911 def test_tzlocal_parse_fold(self):
912 # One manifestion of GH #318

Callers

nothing calls this directly

Calls 2

parseFunction · 0.90
TZEnvContextClass · 0.85

Tested by

no test coverage detected