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

Method test_normal_posix

Lib/test/test_getpath.py:268–291  ·  view source on GitHub ↗

Test a 'standard' install layout on *nix

(self)

Source from the content-addressed store, hash-verified

266 self.assertEqual(expected, actual)
267
268 def test_normal_posix(self):
269 "Test a 'standard' install layout on *nix"
270 ns = MockPosixNamespace(
271 PREFIX="/usr",
272 argv0="python",
273 ENV_PATH="/usr/bin",
274 )
275 ns.add_known_xfile("/usr/bin/python")
276 ns.add_known_file("/usr/lib/python9.8/os.py")
277 ns.add_known_dir("/usr/lib/python9.8/lib-dynload")
278 expected = dict(
279 executable="/usr/bin/python",
280 base_executable="/usr/bin/python",
281 prefix="/usr",
282 exec_prefix="/usr",
283 module_search_paths_set=1,
284 module_search_paths=[
285 "/usr/lib/python98.zip",
286 "/usr/lib/python9.8",
287 "/usr/lib/python9.8/lib-dynload",
288 ],
289 )
290 actual = getpath(ns, expected)
291 self.assertEqual(expected, actual)
292
293 def test_buildpath_posix(self):
294 """Test an in-build-tree layout on POSIX.

Callers

nothing calls this directly

Calls 6

add_known_xfileMethod · 0.95
add_known_fileMethod · 0.95
add_known_dirMethod · 0.95
MockPosixNamespaceClass · 0.85
getpathFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected