summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2015-03-08 19:43:10 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2015-03-08 19:43:10 (GMT)
commit5bd7bf5bab3a961a3952e36b053eb93818553e13 (patch)
treec6df9941bf61e2de5917b788bf59436a8495b49b /Lib/test
parentaf098a221aba15dfd121250e590c8ff72c81665b (diff)
downloadcpython-5bd7bf5bab3a961a3952e36b053eb93818553e13.zip
cpython-5bd7bf5bab3a961a3952e36b053eb93818553e13.tar.gz
cpython-5bd7bf5bab3a961a3952e36b053eb93818553e13.tar.bz2
Issue #22980: Under Linux, C extensions now include bitness in the file name,
to make it easy to test 32-bit and 64-bit builds in the same working tree.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sysconfig.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 804c446..3711784 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -389,6 +389,12 @@ class TestSysConfig(unittest.TestCase):
self.assertIsNotNone(vars['SO'])
self.assertEqual(vars['SO'], vars['EXT_SUFFIX'])
+ @unittest.skipUnless(sys.platform == 'linux', 'Linux-specific test')
+ def test_bitness_in_ext_suffix(self):
+ suffix = sysconfig.get_config_var('EXT_SUFFIX')
+ bitness = '-32b' if sys.maxsize < 2**32 else '-64b'
+ self.assertTrue(suffix.endswith(bitness + '.so'), suffix)
+
class MakefileTests(unittest.TestCase):