Test an out-of-build-tree layout on Windows with PYTHONHOME override.
(self)
| 213 | self.assertEqual(expected, actual) |
| 214 | |
| 215 | def test_buildtree_pythonhome_win32(self): |
| 216 | "Test an out-of-build-tree layout on Windows with PYTHONHOME override." |
| 217 | ns = MockNTNamespace( |
| 218 | argv0=r"C:\Out\python.exe", |
| 219 | real_executable=r"C:\Out\python.exe", |
| 220 | ENV_PYTHONHOME=r"C:\CPython", |
| 221 | ) |
| 222 | ns.add_known_xfile(r"C:\Out\python.exe") |
| 223 | ns.add_known_file(r"C:\CPython\Lib\os.py") |
| 224 | ns.add_known_file(r"C:\Out\pybuilddir.txt", [""]) |
| 225 | expected = dict( |
| 226 | executable=r"C:\Out\python.exe", |
| 227 | base_executable=r"C:\Out\python.exe", |
| 228 | prefix=r"C:\CPython", |
| 229 | exec_prefix=r"C:\CPython", |
| 230 | # This build_prefix is a miscalculation, because we have |
| 231 | # moved the output direction out of the prefix. |
| 232 | # Specify PYTHONHOME to get the correct prefix/exec_prefix |
| 233 | build_prefix="C:\\", |
| 234 | _is_python_build=1, |
| 235 | module_search_paths_set=1, |
| 236 | module_search_paths=[ |
| 237 | r"C:\Out\python98.zip", |
| 238 | r"C:\Out", |
| 239 | r"C:\CPython\Lib", |
| 240 | ], |
| 241 | ) |
| 242 | actual = getpath(ns, expected) |
| 243 | self.assertEqual(expected, actual) |
| 244 | |
| 245 | def test_no_dlls_win32(self): |
| 246 | "Test a layout on Windows with no DLLs directory." |
nothing calls this directly
no test coverage detected