Test a 'standard' install layout via symlink on *nix
(self)
| 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. |
nothing calls this directly
no test coverage detected