From 419d48579d6e713435c4a4b5d0ee4b76d28a9737 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Tue, 2 Sep 2025 16:07:14 +0300
Subject: [PATCH 139/N] Fix test for library name

---
 Lib/test/test_sysconfig.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 1f68c6c..e61cfa3 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -459,7 +459,10 @@ class TestSysConfig(unittest.TestCase):
         ldlibrary = sysconfig.get_config_var('LDLIBRARY')
         major, minor = sys.version_info[:2]
         if sys.platform == 'win32':
-            self.assertTrue(library.startswith(f'python{major}{minor}'))
+            if 'mingw' in sys.version.lower():
+                self.assertTrue(library.startswith(f'libpython{major}.{minor}'))
+            else:
+                self.assertTrue(library.startswith(f'python{major}{minor}'))
             self.assertTrue(library.endswith('.dll'))
             self.assertEqual(library, ldlibrary)
         elif is_apple_mobile:
