MCPcopy Index your code
hub / github.com/python/cpython / test_exclude_localtime

Method test_exclude_localtime

Lib/test/test_zoneinfo/test_zoneinfo.py:2058–2072  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2056 self.assertEqual(actual, expected)
2057
2058 def test_exclude_localtime(self):
2059 expected = {
2060 "America/New_York",
2061 "Europe/London",
2062 }
2063
2064 tree = list(expected) + ["localtime"]
2065
2066 with tempfile.TemporaryDirectory() as td:
2067 for key in tree:
2068 self.touch_zone(key, td)
2069
2070 with self.tzpath_context([td]):
2071 actual = self.module.available_timezones()
2072 self.assertEqual(actual, expected)
2073
2074class CTestModule(TestModule):
2075 module = c_zoneinfo

Callers

nothing calls this directly

Calls 4

touch_zoneMethod · 0.95
listClass · 0.85
tzpath_contextMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected