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

Method test_get_path

Lib/test/test_sysconfig.py:126–138  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 self.assertEqual(scheme, wanted)
125
126 def test_get_path(self):
127 config_vars = get_config_vars()
128 if os.name == 'nt':
129 # On Windows, we replace the native platlibdir name with the
130 # default so that POSIX schemes resolve correctly
131 config_vars = config_vars | {'platlibdir': 'lib'}
132 for scheme in _INSTALL_SCHEMES:
133 for name in _INSTALL_SCHEMES[scheme]:
134 expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars)
135 self.assertEqual(
136 os.path.normpath(get_path(name, scheme)),
137 os.path.normpath(expected),
138 )
139
140 def test_get_default_scheme(self):
141 self.assertIn(get_default_scheme(), _INSTALL_SCHEMES)

Callers

nothing calls this directly

Calls 4

get_config_varsFunction · 0.90
get_pathFunction · 0.90
formatMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected