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

Method test_makepath

Lib/test/test_site.py:92–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90 sysconfig._CONFIG_VARS.update(self.old_vars)
91
92 def test_makepath(self):
93 # Test makepath() have an absolute path for its first return value
94 # and a case-normalized version of the absolute path for its
95 # second value.
96 path_parts = ("Beginning", "End")
97 original_dir = os.path.join(*path_parts)
98 abs_dir, norm_dir = site.makepath(*path_parts)
99 self.assertEqual(os.path.abspath(original_dir), abs_dir)
100 if original_dir == os.path.normcase(original_dir):
101 self.assertEqual(abs_dir, norm_dir)
102 else:
103 self.assertEqual(os.path.normcase(abs_dir), norm_dir)
104
105 def test_init_pathinfo(self):
106 dir_set = site._init_pathinfo()

Callers

nothing calls this directly

Calls 4

normcaseMethod · 0.80
joinMethod · 0.45
assertEqualMethod · 0.45
abspathMethod · 0.45

Tested by

no test coverage detected