gh-127146: Emscripten: Skip segfaults in test suite (#127151)

Added skips for tests known to cause problems when running on Emscripten. 
These mostly relate to the limited stack depth on Emscripten.
This commit is contained in:
Hood Chatham 2024-12-05 01:26:25 +01:00 committed by GitHub
parent 2f1cee8477
commit 43634fc1fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 46 additions and 8 deletions

View file

@ -68,6 +68,7 @@ def default(self, o):
self.fail("didn't raise ValueError on default recursion")
@support.skip_emscripten_stack_overflow()
def test_highly_nested_objects_decoding(self):
# test that loading highly-nested objects doesn't segfault when C
# accelerations are used. See #12017
@ -81,6 +82,7 @@ def test_highly_nested_objects_decoding(self):
with support.infinite_recursion():
self.loads('[' * 100000 + '1' + ']' * 100000)
@support.skip_emscripten_stack_overflow()
def test_highly_nested_objects_encoding(self):
# See #12051
l, d = [], {}
@ -93,6 +95,7 @@ def test_highly_nested_objects_encoding(self):
with support.infinite_recursion(5000):
self.dumps(d)
@support.skip_emscripten_stack_overflow()
def test_endless_recursion(self):
# See #12051
class EndlessJSONEncoder(self.json.JSONEncoder):