gh-112984: Fix test_ctypes.test_loading.test_load_dll_with_flags when directory name includes a dot (GH-114217)

This commit is contained in:
Steve Dower 2024-01-18 00:26:31 +00:00 committed by GitHub
parent f56d132deb
commit 945540306c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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"