]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112984: Fix test_ctypes.test_loading.test_load_dll_with_flags when directory name...
authorSteve Dower <steve.dower@python.org>
Thu, 18 Jan 2024 00:26:31 +0000 (00:26 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Jan 2024 00:26:31 +0000 (00:26 +0000)
Lib/test/test_ctypes/test_loading.py

index 9f0547f4c955c05737b95a02a1b9cc24fa49a3a8..59d7f51935f3cd8f6a3da20133d1f0c67b9b6e66 100644 (file)
@@ -141,7 +141,7 @@ class LoaderTest(unittest.TestCase):
     def test_load_dll_with_flags(self):
         _sqlite3 = import_helper.import_module("_sqlite3")
         src = _sqlite3.__file__
-        if src.partition(".")[0].lower().endswith("_d"):
+        if os.path.basename(src).partition(".")[0].lower().endswith("_d"):
             ext = "_d.dll"
         else:
             ext = ".dll"