Test a 'standard' install layout via symlink on macOS
(self)
| 771 | self.assertEqual(expected, actual) |
| 772 | |
| 773 | def test_symlink_normal_macos(self): |
| 774 | "Test a 'standard' install layout via symlink on macOS" |
| 775 | ns = MockPosixNamespace( |
| 776 | os_name="darwin", |
| 777 | PREFIX="/usr", |
| 778 | argv0="python", |
| 779 | ENV_PATH="/linkfrom:/usr/bin", |
| 780 | # real_executable on macOS matches the invocation path |
| 781 | real_executable="/linkfrom/python", |
| 782 | ) |
| 783 | ns.add_known_xfile("/linkfrom/python") |
| 784 | ns.add_known_xfile("/usr/bin/python") |
| 785 | ns.add_known_link("/linkfrom/python", "/usr/bin/python") |
| 786 | ns.add_known_file("/usr/lib/python9.8/os.py") |
| 787 | ns.add_known_dir("/usr/lib/python9.8/lib-dynload") |
| 788 | expected = dict( |
| 789 | executable="/linkfrom/python", |
| 790 | base_executable="/linkfrom/python", |
| 791 | prefix="/usr", |
| 792 | exec_prefix="/usr", |
| 793 | module_search_paths_set=1, |
| 794 | module_search_paths=[ |
| 795 | "/usr/lib/python98.zip", |
| 796 | "/usr/lib/python9.8", |
| 797 | "/usr/lib/python9.8/lib-dynload", |
| 798 | ], |
| 799 | ) |
| 800 | actual = getpath(ns, expected) |
| 801 | self.assertEqual(expected, actual) |
| 802 | |
| 803 | def test_symlink_buildpath_macos(self): |
| 804 | """Test an in-build-tree layout via symlink on macOS. |
nothing calls this directly
no test coverage detected