gh-127146: Emscripten: more regular stack overflow skips (#136708)

Makes the Emscripten stack overflow skip message consistent with WASI, 
and replaces some ad-hoc skips.
This commit is contained in:
Hood Chatham
2025-07-16 16:02:25 +02:00
committed by GitHub
parent 12e52cad71
commit c730952aa6
3 changed files with 3 additions and 3 deletions

View File

@@ -570,7 +570,7 @@ is_emscripten = sys.platform == "emscripten"
is_wasi = sys.platform == "wasi" is_wasi = sys.platform == "wasi"
def skip_emscripten_stack_overflow(): def skip_emscripten_stack_overflow():
return unittest.skipIf(is_emscripten, "Exhausts limited stack on Emscripten") return unittest.skipIf(is_emscripten, "Exhausts stack on Emscripten")
def skip_wasi_stack_overflow(): def skip_wasi_stack_overflow():
return unittest.skipIf(is_wasi, "Exhausts stack on WASI") return unittest.skipIf(is_wasi, "Exhausts stack on WASI")

View File

@@ -3942,7 +3942,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
# it as a leak. # it as a leak.
del C.__del__ del C.__del__
@unittest.skipIf(support.is_emscripten, "Seems to works in Pyodide?") @support.skip_emscripten_stack_overflow()
@support.skip_wasi_stack_overflow() @support.skip_wasi_stack_overflow()
def test_slots_trash(self): def test_slots_trash(self):
# Testing slot trash... # Testing slot trash...

View File

@@ -58,7 +58,7 @@ class MiscTests(unittest.TestCase):
self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'}) self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'})
@support.skip_wasi_stack_overflow() @support.skip_wasi_stack_overflow()
@unittest.skipIf(support.is_emscripten, "segfaults") @support.skip_emscripten_stack_overflow()
def test_trashcan(self): def test_trashcan(self):
# If this test fails, it will most likely die via segfault. # If this test fails, it will most likely die via segfault.
e = root = cET.Element('root') e = root = cET.Element('root')