diff options
author | Steve Dower <steve.dower@python.org> | 2022-11-02 18:38:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 18:38:40 (GMT) |
commit | 3d889dc0a0efa6fcbd984ece365c9ac08d2cd4a9 (patch) | |
tree | 48126e7aa2ca872aa5252d8c295bbc8b9db6d260 /Lib/test/test_getpath.py | |
parent | f520d720f667c87f7b70ed86ea58d73892d6b969 (diff) | |
download | cpython-3d889dc0a0efa6fcbd984ece365c9ac08d2cd4a9.zip cpython-3d889dc0a0efa6fcbd984ece365c9ac08d2cd4a9.tar.gz cpython-3d889dc0a0efa6fcbd984ece365c9ac08d2cd4a9.tar.bz2 |
gh-98790: When DLLs directory is missing on Windows, assume executable_dir contains PYD files instead (GH-98936)
Diffstat (limited to 'Lib/test/test_getpath.py')
-rw-r--r-- | Lib/test/test_getpath.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Lib/test/test_getpath.py b/Lib/test/test_getpath.py index 1e46cb5..12d5244 100644 --- a/Lib/test/test_getpath.py +++ b/Lib/test/test_getpath.py @@ -238,6 +238,29 @@ class MockGetPathTests(unittest.TestCase): actual = getpath(ns, expected) self.assertEqual(expected, actual) + def test_no_dlls_win32(self): + "Test a layout on Windows with no DLLs directory." + ns = MockNTNamespace( + argv0=r"C:\Python\python.exe", + real_executable=r"C:\Python\python.exe", + ) + ns.add_known_xfile(r"C:\Python\python.exe") + ns.add_known_file(r"C:\Python\Lib\os.py") + expected = dict( + executable=r"C:\Python\python.exe", + base_executable=r"C:\Python\python.exe", + prefix=r"C:\Python", + exec_prefix=r"C:\Python", + module_search_paths_set=1, + module_search_paths=[ + r"C:\Python\python98.zip", + r"C:\Python\Lib", + r"C:\Python", + ], + ) + actual = getpath(ns, expected) + self.assertEqual(expected, actual) + def test_normal_posix(self): "Test a 'standard' install layout on *nix" ns = MockPosixNamespace( |