mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-100320: Fix path calculations on Windows when python.exe is moved outside of the normal location (GH-100947)
This commit is contained in:
parent
63690e9af8
commit
87ade7ebda
4 changed files with 54 additions and 33 deletions
|
|
@ -38,8 +38,9 @@ def test_normal_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\Python\python98.zip",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python\DLLs",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -64,8 +65,8 @@ def test_buildtree_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\CPython\PCbuild\amd64\python98.zip",
|
||||
r"C:\CPython\Lib",
|
||||
r"C:\CPython\PCbuild\amd64",
|
||||
r"C:\CPython\Lib",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -134,8 +135,9 @@ def test_registry_win32(self):
|
|||
r"C:\Python\python98.zip",
|
||||
"path1-dir",
|
||||
# should not contain not-subdirs
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python\DLLs",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -148,8 +150,9 @@ def test_registry_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\Python\python98.zip",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python\DLLs",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -174,8 +177,9 @@ def test_symlink_normal_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\Python\python98.zip",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python\DLLs",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -202,8 +206,8 @@ def test_symlink_buildtree_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\CPython\PCbuild\amd64\python98.zip",
|
||||
r"C:\CPython\Lib",
|
||||
r"C:\CPython\PCbuild\amd64",
|
||||
r"C:\CPython\Lib",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -232,8 +236,8 @@ def test_buildtree_pythonhome_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\Out\python98.zip",
|
||||
r"C:\CPython\Lib",
|
||||
r"C:\Out",
|
||||
r"C:\CPython\Lib",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
@ -255,8 +259,8 @@ def test_no_dlls_win32(self):
|
|||
module_search_paths_set=1,
|
||||
module_search_paths=[
|
||||
r"C:\Python\python98.zip",
|
||||
r"C:\Python\Lib",
|
||||
r"C:\Python",
|
||||
r"C:\Python\Lib",
|
||||
],
|
||||
)
|
||||
actual = getpath(ns, expected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue