From: Steve Dower Date: Thu, 18 Jan 2024 00:26:31 +0000 (+0000) Subject: gh-112984: Fix test_ctypes.test_loading.test_load_dll_with_flags when directory name... X-Git-Tag: v3.13.0a4~438 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=945540306c12116154d2e4cc6c17a8efd2290537;p=thirdparty%2FPython%2Fcpython.git gh-112984: Fix test_ctypes.test_loading.test_load_dll_with_flags when directory name includes a dot (GH-114217) --- diff --git a/Lib/test/test_ctypes/test_loading.py b/Lib/test/test_ctypes/test_loading.py index 9f0547f4c955..59d7f51935f3 100644 --- a/Lib/test/test_ctypes/test_loading.py +++ b/Lib/test/test_ctypes/test_loading.py @@ -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"