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

Method testTZSetDoesntCorrupt

tests/test_tz.py:2078–2084  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2076
2077 @unittest.skipIf(IS_WIN, "requires Unix")
2078 def testTZSetDoesntCorrupt(self):
2079 # if we start in non-UTC then tzset UTC make sure parse doesn't get
2080 # confused
2081 with TZEnvContext('UTC'):
2082 # this should parse to UTC timezone not the original timezone
2083 dt = parse('2014-07-20T12:34:56+00:00')
2084 self.assertEqual(str(dt), '2014-07-20 12:34:56+00:00')
2085
2086
2087@pytest.mark.tzfile

Callers

nothing calls this directly

Calls 2

parseFunction · 0.90
TZEnvContextClass · 0.85

Tested by

no test coverage detected