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

Method test_tzpath_attribute

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

Source from the content-addressed store, hash-verified

1911 self.module.reset_tzpath(bad_value)
1912
1913 def test_tzpath_attribute(self):
1914 tzpath_0 = [f"{DRIVE}/one", f"{DRIVE}/two"]
1915 tzpath_1 = [f"{DRIVE}/three"]
1916 tzpath_pathlike = (FakePath(f"{DRIVE}/usr/share/zoneinfo"),)
1917
1918 with self.tzpath_context(tzpath_0):
1919 query_0 = self.module.TZPATH
1920
1921 with self.tzpath_context(tzpath_1):
1922 query_1 = self.module.TZPATH
1923
1924 with self.tzpath_context(tzpath_pathlike):
1925 query_pathlike = self.module.TZPATH
1926
1927 self.assertSequenceEqual(tzpath_0, query_0)
1928 self.assertSequenceEqual(tzpath_1, query_1)
1929 self.assertSequenceEqual(tuple([os.fspath(p) for p in tzpath_pathlike]), query_pathlike)
1930
1931
1932class CTzPathTest(TzPathTest):

Callers

nothing calls this directly

Calls 3

FakePathClass · 0.90
tzpath_contextMethod · 0.80
assertSequenceEqualMethod · 0.80

Tested by

no test coverage detected