File tree Expand file tree Collapse file tree
Lib/test/test_importlib/extension Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66import unittest
77import sys
8+ import sysconfig
89
910
1011class FinderTests (abc .FinderTests ):
@@ -68,11 +69,22 @@ def test_abi3_extension_suffixes(self):
6869 pass
6970 else :
7071 if Py_GIL_DISABLED :
71- self .assertNotIn ( ".abi3.so" , suffixes )
72+ self .assertFalse ( any ( ".abi3" in suffix ) for suffix in suffixes )
7273 else :
7374 self .assertIn (".abi3.so" , suffixes )
7475 self .assertIn (".abi3t.so" , suffixes )
7576
77+ @unittest .skipIf (
78+ not sysconfig .get_config_var ("SOABI_PLATFORM" ).strip ('"' ),
79+ "Linux-only test"
80+ )
81+ def test_multiarch_abi3_extension_suffixes (self ):
82+ suffixes = self .machinery .EXTENSION_SUFFIXES
83+ platform = sysconfig .get_config_var ("SOABI_PLATFORM" ).strip ('"' )
84+ if Py_GIL_DISABLED :
85+ self .assertIn (f".abi3-{ platform } .so" , suffixes )
86+ self .assertIn (f".abi3t-{ platform } .so" , suffixes )
87+
7688
7789(Frozen_FinderTests ,
7890 Source_FinderTests
You can’t perform that action at this time.
0 commit comments