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

Method test_exclude_posixrules

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

Source from the content-addressed store, hash-verified

2040 self.assertEqual(actual, expected)
2041
2042 def test_exclude_posixrules(self):
2043 expected = {
2044 "America/New_York",
2045 "Europe/London",
2046 }
2047
2048 tree = list(expected) + ["posixrules"]
2049
2050 with tempfile.TemporaryDirectory() as td:
2051 for key in tree:
2052 self.touch_zone(key, td)
2053
2054 with self.tzpath_context([td]):
2055 actual = self.module.available_timezones()
2056 self.assertEqual(actual, expected)
2057
2058 def test_exclude_localtime(self):
2059 expected = {

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