https://github.com/python/cpython/commit/0f38ab0686b8dba8b84051962a4c5ee4667a626a
commit: 0f38ab0686b8dba8b84051962a4c5ee4667a626a
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2026-09-25T18:58:28-07:00
summary:

[3.14] gh-158091: Check only the file name for _d in test_dll_dependency_import 
(GH-158099) (#158109)


(cherry picked from commit f9719f68ac6cc4b225c439808e126c6e619c2f65)

Co-authored-by: Lazizbek Ergashev <[email protected]>

files:
M Lib/test/test_import/__init__.py

diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 1d7f69d0a72d0e..3c47be43a95b72 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -787,7 +787,7 @@ def test_dll_dependency_import(self):
         pydname = importlib.util.find_spec("_sqlite3").origin
         depname = os.path.join(
             os.path.dirname(pydname),
-            "sqlite3{}.dll".format("_d" if "_d" in pydname else ""))
+            "sqlite3{}.dll".format("_d" if "_d" in os.path.basename(pydname) 
else ""))
 
         with os_helper.temp_dir() as tmp:
             tmp2 = os.path.join(tmp, "DLLs")

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to