bpo-27643 - skip test_ctypes test case with XLC compiler. (GH-5164)

This test case needs "signed short" bitfields, but the
IBM XLC compiler (on AIX) does not support this.

Skip the code and test when AIX and XLC are used.

Use __xlc__ as identifier to detect the XLC compiler.
This commit is contained in:
Michael Felt 2018-12-26 04:54:22 +01:00 committed by Nick Coghlan
parent 5661459f5f
commit 22462da70c
3 changed files with 23 additions and 4 deletions

View file

@ -40,6 +40,10 @@ class C_Test(unittest.TestCase):
self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
def test_shorts(self):
b = BITS()
name = "M"
if func(byref(b), name.encode('ascii')) == 999:
self.skipTest("Compiler does not support signed short bitfields")
for i in range(256):
for name in "MNOPQRS":
b = BITS()