Test an in-build-tree layout on POSIX. This layout is discovered from the presence of pybuilddir.txt, which contains the relative path from the executable's directory to the platstdlib path.
(self)
| 498 | self.assertEqual(expected, actual) |
| 499 | |
| 500 | def test_symlink_buildpath_posix(self): |
| 501 | """Test an in-build-tree layout on POSIX. |
| 502 | |
| 503 | This layout is discovered from the presence of pybuilddir.txt, which |
| 504 | contains the relative path from the executable's directory to the |
| 505 | platstdlib path. |
| 506 | """ |
| 507 | ns = MockPosixNamespace( |
| 508 | argv0=r"/linkfrom/python", |
| 509 | PREFIX="/usr/local", |
| 510 | ) |
| 511 | ns.add_known_xfile("/linkfrom/python") |
| 512 | ns.add_known_xfile("/home/cpython/python") |
| 513 | ns.add_known_link("/linkfrom/python", "/home/cpython/python") |
| 514 | ns.add_known_xfile("/usr/local/bin/python") |
| 515 | ns.add_known_file("/home/cpython/pybuilddir.txt", ["build/lib.linux-x86_64-9.8"]) |
| 516 | ns.add_known_file("/home/cpython/Lib/os.py") |
| 517 | ns.add_known_dir("/home/cpython/lib-dynload") |
| 518 | expected = dict( |
| 519 | executable="/linkfrom/python", |
| 520 | prefix="/usr/local", |
| 521 | exec_prefix="/usr/local", |
| 522 | base_executable="/linkfrom/python", |
| 523 | build_prefix="/home/cpython", |
| 524 | _is_python_build=1, |
| 525 | module_search_paths_set=1, |
| 526 | module_search_paths=[ |
| 527 | "/usr/local/lib/python98.zip", |
| 528 | "/home/cpython/Lib", |
| 529 | "/home/cpython/build/lib.linux-x86_64-9.8", |
| 530 | ], |
| 531 | ) |
| 532 | actual = getpath(ns, expected) |
| 533 | self.assertEqual(expected, actual) |
| 534 | |
| 535 | def test_custom_platlibdir_posix(self): |
| 536 | "Test an install with custom platlibdir on *nix" |
nothing calls this directly
no test coverage detected