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

Method test_symlink_normal_posix

Lib/test/test_getpath.py:474–498  ·  view source on GitHub ↗

Test a 'standard' install layout via symlink on *nix

(self)

Source from the content-addressed store, hash-verified

472 self.assertEqual(expected, actual)
473
474 def test_symlink_normal_posix(self):
475 "Test a 'standard' install layout via symlink on *nix"
476 ns = MockPosixNamespace(
477 PREFIX="/usr",
478 argv0="/linkfrom/python",
479 )
480 ns.add_known_xfile("/linkfrom/python")
481 ns.add_known_xfile("/usr/bin/python")
482 ns.add_known_link("/linkfrom/python", "/usr/bin/python")
483 ns.add_known_file("/usr/lib/python9.8/os.py")
484 ns.add_known_dir("/usr/lib/python9.8/lib-dynload")
485 expected = dict(
486 executable="/linkfrom/python",
487 base_executable="/linkfrom/python",
488 prefix="/usr",
489 exec_prefix="/usr",
490 module_search_paths_set=1,
491 module_search_paths=[
492 "/usr/lib/python98.zip",
493 "/usr/lib/python9.8",
494 "/usr/lib/python9.8/lib-dynload",
495 ],
496 )
497 actual = getpath(ns, expected)
498 self.assertEqual(expected, actual)
499
500 def test_symlink_buildpath_posix(self):
501 """Test an in-build-tree layout on POSIX.

Callers

nothing calls this directly

Calls 7

add_known_xfileMethod · 0.95
add_known_linkMethod · 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