Skip to content

Commit 396e667

Browse files
committed
test_struct: skip SIGSEG tests
1 parent c49c02e commit 396e667

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

graalpython/lib-python/3/test/test_struct.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def bigendian_to_native(value):
3030
return string_reverse(value)
3131

3232
class StructTest(unittest.TestCase):
33+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
3334
def test_isbigendian(self):
3435
self.assertEqual((struct.pack('=i', 1)[0] == 0), ISBIGENDIAN)
3536

@@ -54,6 +55,7 @@ def test_consistence(self):
5455
self.assertRaises(struct.error, struct.unpack, 'iii', s)
5556
self.assertRaises(struct.error, struct.unpack, 'i', s)
5657

58+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
5759
def test_transitiveness(self):
5860
c = b'a'
5961
b = 1
@@ -78,6 +80,7 @@ def test_transitiveness(self):
7880
self.assertEqual(int(100 * dp), int(100 * d))
7981
self.assertEqual(tp, t)
8082

83+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
8184
def test_new_features(self):
8285
# Test some of the new features in detail
8386
# (format, argument, big-endian result, little-endian result, asymmetric)
@@ -332,6 +335,7 @@ def assertStructError(func, *args, **kwargs):
332335
assertStructError(struct.pack, format, 0)
333336
assertStructError(struct.unpack, format, b"")
334337

338+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
335339
def test_p_code(self):
336340
# Test p ("Pascal string") code.
337341
for code, input, expected, expectedback in [
@@ -348,6 +352,7 @@ def test_p_code(self):
348352
(got,) = struct.unpack(code, got)
349353
self.assertEqual(got, expectedback)
350354

355+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
351356
def test_705836(self):
352357
# SF bug 705836. "<f" and ">f" had a severe rounding bug, where a carry
353358
# from the low-order discarded bits could propagate into the exponent
@@ -381,6 +386,7 @@ def test_705836(self):
381386
big = math.ldexp(big, 127 - 24)
382387
self.assertRaises(OverflowError, struct.pack, ">f", big)
383388

389+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
384390
def test_1530559(self):
385391
for code, byteorder in iter_integer_formats():
386392
format = byteorder + code
@@ -475,6 +481,7 @@ def test_unpack_with_buffer(self):
475481
value, = struct.unpack('>I', data)
476482
self.assertEqual(value, 0x12345678)
477483

484+
@unittest.skipIfGraalPython(reason="not yet supported, causes SEGFAULT")
478485
def test_bool(self):
479486
class ExplodingBool(object):
480487
def __bool__(self):

0 commit comments

Comments
 (0)