From a1df9c65a02c64dde9dc04859a30ce03e044c473 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 18 Jan 2024 00:07:42 +0000 Subject: [PATCH] Fix test_ctypes.test_loading.test_load_dll_with_flags when directory name includes a dot --- Lib/test/test_ctypes/test_loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_ctypes/test_loading.py b/Lib/test/test_ctypes/test_loading.py index 9f0547f4c955c0..59d7f51935f3cd 100644 --- a/Lib/test/test_ctypes/test_loading.py +++ b/Lib/test/test_ctypes/test_loading.py @@ -141,7 +141,7 @@ def test_load_hasattr(self): 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"