Skip to content

Commit 295fabb

Browse files
committed
Add test skips for ctypes tests that don't work on emscripten
1 parent f5ad580 commit 295fabb

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lib/test/test_ctypes/test_as_parameter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
c_short, c_int, c_long, c_longlong,
66
c_byte, c_wchar, c_float, c_double,
77
ArgumentError)
8-
from test.support import import_helper, skip_if_sanitizer
8+
from test.support import import_helper, skip_if_sanitizer, skip_emscripten_stack_overflow
99
_ctypes_test = import_helper.import_module("_ctypes_test")
1010

1111

@@ -193,6 +193,7 @@ class S8I(Structure):
193193
(9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9))
194194

195195
@skip_if_sanitizer('requires deep stack', thread=True)
196+
@skip_emscripten_stack_overflow()
196197
def test_recursive_as_param(self):
197198
class A:
198199
pass

Lib/test/test_ctypes/test_structures.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,15 @@ class X(Structure):
302302
def _test_issue18060(self, Vector):
303303
# Regression tests for gh-62260
304304

305+
# This test passes a struct of two doubles by value to the atan2(),
306+
# whose actual C signature is atan2(double, double), so it only works on
307+
# platforms where the abi of a function that takes a struct with two
308+
# doubles matches the abi of a function that takes two doubles. The
309+
# wasm32 ABI does not satisfy this condition and the test breaks.
310+
if support.is_wasm32:
311+
self.skipTest(
312+
"wasm ABI is incompatible with test expectations")
313+
305314
# The call to atan2() should succeed if the
306315
# class fields were correctly cloned in the
307316
# subclasses. Otherwise, it will segfault.

0 commit comments

Comments
 (0)