mirror of
https://github.com/python/cpython.git
synced 2025-09-25 09:50:37 +00:00
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:
parent
2f1cee8477
commit
43634fc1fc
21 changed files with 46 additions and 8 deletions
|
@ -6,7 +6,7 @@ import sys
|
||||||
from functools import cmp_to_key
|
from functools import cmp_to_key
|
||||||
|
|
||||||
from test import seq_tests
|
from test import seq_tests
|
||||||
from test.support import ALWAYS_EQ, NEVER_EQ, get_c_recursion_limit
|
from test.support import ALWAYS_EQ, NEVER_EQ, get_c_recursion_limit, skip_emscripten_stack_overflow
|
||||||
|
|
||||||
|
|
||||||
class CommonTest(seq_tests.CommonTest):
|
class CommonTest(seq_tests.CommonTest):
|
||||||
|
@ -59,6 +59,7 @@ class CommonTest(seq_tests.CommonTest):
|
||||||
self.assertEqual(str(a2), "[0, 1, 2, [...], 3]")
|
self.assertEqual(str(a2), "[0, 1, 2, [...], 3]")
|
||||||
self.assertEqual(repr(a2), "[0, 1, 2, [...], 3]")
|
self.assertEqual(repr(a2), "[0, 1, 2, [...], 3]")
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_repr_deep(self):
|
def test_repr_deep(self):
|
||||||
a = self.type2test([])
|
a = self.type2test([])
|
||||||
for i in range(get_c_recursion_limit() + 1):
|
for i in range(get_c_recursion_limit() + 1):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# tests common to dict and UserDict
|
# tests common to dict and UserDict
|
||||||
import unittest
|
import unittest
|
||||||
import collections
|
import collections
|
||||||
from test.support import get_c_recursion_limit
|
from test.support import get_c_recursion_limit, skip_emscripten_stack_overflow
|
||||||
|
|
||||||
|
|
||||||
class BasicTestMappingProtocol(unittest.TestCase):
|
class BasicTestMappingProtocol(unittest.TestCase):
|
||||||
|
@ -622,6 +622,7 @@ class TestHashMappingProtocol(TestMappingProtocol):
|
||||||
d = self._full_mapping({1: BadRepr()})
|
d = self._full_mapping({1: BadRepr()})
|
||||||
self.assertRaises(Exc, repr, d)
|
self.assertRaises(Exc, repr, d)
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_repr_deep(self):
|
def test_repr_deep(self):
|
||||||
d = self._empty_mapping()
|
d = self._empty_mapping()
|
||||||
for i in range(get_c_recursion_limit() + 1):
|
for i in range(get_c_recursion_limit() + 1):
|
||||||
|
|
|
@ -535,6 +535,9 @@ else:
|
||||||
is_emscripten = sys.platform == "emscripten"
|
is_emscripten = sys.platform == "emscripten"
|
||||||
is_wasi = sys.platform == "wasi"
|
is_wasi = sys.platform == "wasi"
|
||||||
|
|
||||||
|
def skip_emscripten_stack_overflow():
|
||||||
|
return unittest.skipIf(is_emscripten, "Exhausts limited stack on Emscripten")
|
||||||
|
|
||||||
is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"}
|
is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"}
|
||||||
is_apple = is_apple_mobile or sys.platform == "darwin"
|
is_apple = is_apple_mobile or sys.platform == "darwin"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ except ImportError:
|
||||||
_testinternalcapi = None
|
_testinternalcapi = None
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import os_helper, script_helper
|
from test.support import os_helper, script_helper, skip_emscripten_stack_overflow
|
||||||
from test.support.ast_helper import ASTTestMixin
|
from test.support.ast_helper import ASTTestMixin
|
||||||
from test.test_ast.utils import to_tuple
|
from test.test_ast.utils import to_tuple
|
||||||
from test.test_ast.snippets import (
|
from test.test_ast.snippets import (
|
||||||
|
@ -745,6 +745,7 @@ class AST_Tests(unittest.TestCase):
|
||||||
enum._test_simple_enum(_Precedence, ast._Precedence)
|
enum._test_simple_enum(_Precedence, ast._Precedence)
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_ast_recursion_limit(self):
|
def test_ast_recursion_limit(self):
|
||||||
fail_depth = support.exceeds_recursion_limit()
|
fail_depth = support.exceeds_recursion_limit()
|
||||||
crash_depth = 100_000
|
crash_depth = 100_000
|
||||||
|
@ -1661,6 +1662,7 @@ Module(
|
||||||
exec(code, ns)
|
exec(code, ns)
|
||||||
self.assertIn('sleep', ns)
|
self.assertIn('sleep', ns)
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_recursion_direct(self):
|
def test_recursion_direct(self):
|
||||||
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
||||||
e.operand = e
|
e.operand = e
|
||||||
|
@ -1668,6 +1670,7 @@ Module(
|
||||||
with support.infinite_recursion():
|
with support.infinite_recursion():
|
||||||
compile(ast.Expression(e), "<test>", "eval")
|
compile(ast.Expression(e), "<test>", "eval")
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_recursion_indirect(self):
|
def test_recursion_indirect(self):
|
||||||
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
||||||
f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
|
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
|
||||||
set_recursion_limit, skip_on_s390x)
|
set_recursion_limit, skip_on_s390x, skip_emscripten_stack_overflow)
|
||||||
try:
|
try:
|
||||||
import _testcapi
|
import _testcapi
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -1038,6 +1038,7 @@ class TestRecursion(unittest.TestCase):
|
||||||
@skip_on_s390x
|
@skip_on_s390x
|
||||||
@unittest.skipIf(is_wasi and Py_DEBUG, "requires deep stack")
|
@unittest.skipIf(is_wasi and Py_DEBUG, "requires deep stack")
|
||||||
@unittest.skipIf(_testcapi is None, "requires _testcapi")
|
@unittest.skipIf(_testcapi is None, "requires _testcapi")
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_super_deep(self):
|
def test_super_deep(self):
|
||||||
|
|
||||||
def recurse(n):
|
def recurse(n):
|
||||||
|
|
|
@ -2137,6 +2137,7 @@ class SubinterpreterTest(unittest.TestCase):
|
||||||
# test fails, assume that the environment in this process may
|
# test fails, assume that the environment in this process may
|
||||||
# be altered and suspect.
|
# be altered and suspect.
|
||||||
|
|
||||||
|
@requires_subinterpreters
|
||||||
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||||
def test_configured_settings(self):
|
def test_configured_settings(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"Test the functionality of Python classes implementing operators."
|
"Test the functionality of Python classes implementing operators."
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import cpython_only, import_helper, script_helper
|
from test.support import cpython_only, import_helper, script_helper, skip_emscripten_stack_overflow
|
||||||
|
|
||||||
testmeths = [
|
testmeths = [
|
||||||
|
|
||||||
|
@ -554,6 +554,7 @@ class ClassTests(unittest.TestCase):
|
||||||
self.assertFalse(hasattr(o, "__call__"))
|
self.assertFalse(hasattr(o, "__call__"))
|
||||||
self.assertFalse(hasattr(c, "__call__"))
|
self.assertFalse(hasattr(c, "__call__"))
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def testSFBug532646(self):
|
def testSFBug532646(self):
|
||||||
# Test for SF bug 532646
|
# Test for SF bug 532646
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,7 @@ class TestSpecifics(unittest.TestCase):
|
||||||
self.assertEqual(d['z'], 12)
|
self.assertEqual(d['z'], 12)
|
||||||
|
|
||||||
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_extended_arg(self):
|
def test_extended_arg(self):
|
||||||
repeat = int(get_c_recursion_limit() * 0.9)
|
repeat = int(get_c_recursion_limit() * 0.9)
|
||||||
longexpr = 'x = x or ' + '-x' * repeat
|
longexpr = 'x = x or ' + '-x' * repeat
|
||||||
|
@ -709,6 +710,7 @@ class TestSpecifics(unittest.TestCase):
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_compiler_recursion_limit(self):
|
def test_compiler_recursion_limit(self):
|
||||||
# Expected limit is Py_C_RECURSION_LIMIT
|
# Expected limit is Py_C_RECURSION_LIMIT
|
||||||
limit = get_c_recursion_limit()
|
limit = get_c_recursion_limit()
|
||||||
|
|
|
@ -371,6 +371,7 @@ class TestCopy(unittest.TestCase):
|
||||||
self.assertIsNot(x, y)
|
self.assertIsNot(x, y)
|
||||||
self.assertIsNot(x[0], y[0])
|
self.assertIsNot(x[0], y[0])
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_deepcopy_reflexive_list(self):
|
def test_deepcopy_reflexive_list(self):
|
||||||
x = []
|
x = []
|
||||||
x.append(x)
|
x.append(x)
|
||||||
|
@ -398,6 +399,7 @@ class TestCopy(unittest.TestCase):
|
||||||
y = copy.deepcopy(x)
|
y = copy.deepcopy(x)
|
||||||
self.assertIs(x, y)
|
self.assertIs(x, y)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_deepcopy_reflexive_tuple(self):
|
def test_deepcopy_reflexive_tuple(self):
|
||||||
x = ([],)
|
x = ([],)
|
||||||
x[0].append(x)
|
x[0].append(x)
|
||||||
|
@ -415,6 +417,7 @@ class TestCopy(unittest.TestCase):
|
||||||
self.assertIsNot(x, y)
|
self.assertIsNot(x, y)
|
||||||
self.assertIsNot(x["foo"], y["foo"])
|
self.assertIsNot(x["foo"], y["foo"])
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_deepcopy_reflexive_dict(self):
|
def test_deepcopy_reflexive_dict(self):
|
||||||
x = {}
|
x = {}
|
||||||
x['foo'] = x
|
x['foo'] = x
|
||||||
|
|
|
@ -3663,6 +3663,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
|
||||||
encoding='latin1', errors='replace')
|
encoding='latin1', errors='replace')
|
||||||
self.assertEqual(ba, b'abc\xbd?')
|
self.assertEqual(ba, b'abc\xbd?')
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_recursive_call(self):
|
def test_recursive_call(self):
|
||||||
# Testing recursive __call__() by setting to instance of class...
|
# Testing recursive __call__() by setting to instance of class...
|
||||||
class A(object):
|
class A(object):
|
||||||
|
@ -3942,6 +3943,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?")
|
||||||
def test_slots_trash(self):
|
def test_slots_trash(self):
|
||||||
# Testing slot trash...
|
# Testing slot trash...
|
||||||
# Deallocating deeply nested slotted trash caused stack overflows
|
# Deallocating deeply nested slotted trash caused stack overflows
|
||||||
|
@ -4864,6 +4866,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
|
||||||
# CALL_METHOD_DESCRIPTOR_O
|
# CALL_METHOD_DESCRIPTOR_O
|
||||||
deque.append(thing, thing)
|
deque.append(thing, thing)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_repr_as_str(self):
|
def test_repr_as_str(self):
|
||||||
# Issue #11603: crash or infinite loop when rebinding __str__ as
|
# Issue #11603: crash or infinite loop when rebinding __str__ as
|
||||||
# __repr__.
|
# __repr__.
|
||||||
|
|
|
@ -594,6 +594,7 @@ class DictTest(unittest.TestCase):
|
||||||
d = {1: BadRepr()}
|
d = {1: BadRepr()}
|
||||||
self.assertRaises(Exc, repr, d)
|
self.assertRaises(Exc, repr, d)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_repr_deep(self):
|
def test_repr_deep(self):
|
||||||
d = {}
|
d = {}
|
||||||
for i in range(get_c_recursion_limit() + 1):
|
for i in range(get_c_recursion_limit() + 1):
|
||||||
|
|
|
@ -2,7 +2,7 @@ import collections.abc
|
||||||
import copy
|
import copy
|
||||||
import pickle
|
import pickle
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import get_c_recursion_limit
|
from test.support import get_c_recursion_limit, skip_emscripten_stack_overflow
|
||||||
|
|
||||||
class DictSetTest(unittest.TestCase):
|
class DictSetTest(unittest.TestCase):
|
||||||
|
|
||||||
|
@ -277,6 +277,7 @@ class DictSetTest(unittest.TestCase):
|
||||||
# Again.
|
# Again.
|
||||||
self.assertIsInstance(r, str)
|
self.assertIsInstance(r, str)
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_deeply_nested_repr(self):
|
def test_deeply_nested_repr(self):
|
||||||
d = {}
|
d = {}
|
||||||
for i in range(get_c_recursion_limit()//2 + 100):
|
for i in range(get_c_recursion_limit()//2 + 100):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import collections.abc
|
import collections.abc
|
||||||
import types
|
import types
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import get_c_recursion_limit
|
from test.support import get_c_recursion_limit, skip_emscripten_stack_overflow
|
||||||
|
|
||||||
class TestExceptionGroupTypeHierarchy(unittest.TestCase):
|
class TestExceptionGroupTypeHierarchy(unittest.TestCase):
|
||||||
def test_exception_group_types(self):
|
def test_exception_group_types(self):
|
||||||
|
@ -464,11 +464,13 @@ class DeepRecursionInSplitAndSubgroup(unittest.TestCase):
|
||||||
e = ExceptionGroup('eg', [e])
|
e = ExceptionGroup('eg', [e])
|
||||||
return e
|
return e
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_deep_split(self):
|
def test_deep_split(self):
|
||||||
e = self.make_deep_eg()
|
e = self.make_deep_eg()
|
||||||
with self.assertRaises(RecursionError):
|
with self.assertRaises(RecursionError):
|
||||||
e.split(TypeError)
|
e.split(TypeError)
|
||||||
|
|
||||||
|
@skip_emscripten_stack_overflow()
|
||||||
def test_deep_subgroup(self):
|
def test_deep_subgroup(self):
|
||||||
e = self.make_deep_eg()
|
e = self.make_deep_eg()
|
||||||
with self.assertRaises(RecursionError):
|
with self.assertRaises(RecursionError):
|
||||||
|
|
|
@ -404,6 +404,7 @@ class TestPartial:
|
||||||
self.assertEqual(r, ((1, 2), {}))
|
self.assertEqual(r, ((1, 2), {}))
|
||||||
self.assertIs(type(r[0]), tuple)
|
self.assertIs(type(r[0]), tuple)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_recursive_pickle(self):
|
def test_recursive_pickle(self):
|
||||||
with replaced_module('functools', self.module):
|
with replaced_module('functools', self.module):
|
||||||
f = self.partial(capture)
|
f = self.partial(capture)
|
||||||
|
@ -2054,6 +2055,7 @@ class TestLRU:
|
||||||
|
|
||||||
@support.skip_on_s390x
|
@support.skip_on_s390x
|
||||||
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
|
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_lru_recursion(self):
|
def test_lru_recursion(self):
|
||||||
|
|
||||||
@self.module.lru_cache
|
@self.module.lru_cache
|
||||||
|
|
|
@ -263,12 +263,14 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
|
||||||
self.assertEqual(True, issubclass(int, (int, (float, int))))
|
self.assertEqual(True, issubclass(int, (int, (float, int))))
|
||||||
self.assertEqual(True, issubclass(str, (str, (Child, str))))
|
self.assertEqual(True, issubclass(str, (str, (Child, str))))
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_subclass_recursion_limit(self):
|
def test_subclass_recursion_limit(self):
|
||||||
# make sure that issubclass raises RecursionError before the C stack is
|
# make sure that issubclass raises RecursionError before the C stack is
|
||||||
# blown
|
# blown
|
||||||
with support.infinite_recursion():
|
with support.infinite_recursion():
|
||||||
self.assertRaises(RecursionError, blowstack, issubclass, str, str)
|
self.assertRaises(RecursionError, blowstack, issubclass, str, str)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_isinstance_recursion_limit(self):
|
def test_isinstance_recursion_limit(self):
|
||||||
# make sure that issubclass raises RecursionError before the C stack is
|
# make sure that issubclass raises RecursionError before the C stack is
|
||||||
# blown
|
# blown
|
||||||
|
@ -315,6 +317,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
|
||||||
self.assertRaises(RecursionError, issubclass, int, X())
|
self.assertRaises(RecursionError, issubclass, int, X())
|
||||||
self.assertRaises(RecursionError, isinstance, 1, X())
|
self.assertRaises(RecursionError, isinstance, 1, X())
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_infinite_recursion_via_bases_tuple(self):
|
def test_infinite_recursion_via_bases_tuple(self):
|
||||||
"""Regression test for bpo-30570."""
|
"""Regression test for bpo-30570."""
|
||||||
class Failure(object):
|
class Failure(object):
|
||||||
|
|
|
@ -68,6 +68,7 @@ class TestRecursion:
|
||||||
self.fail("didn't raise ValueError on default recursion")
|
self.fail("didn't raise ValueError on default recursion")
|
||||||
|
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_highly_nested_objects_decoding(self):
|
def test_highly_nested_objects_decoding(self):
|
||||||
# test that loading highly-nested objects doesn't segfault when C
|
# test that loading highly-nested objects doesn't segfault when C
|
||||||
# accelerations are used. See #12017
|
# accelerations are used. See #12017
|
||||||
|
@ -81,6 +82,7 @@ class TestRecursion:
|
||||||
with support.infinite_recursion():
|
with support.infinite_recursion():
|
||||||
self.loads('[' * 100000 + '1' + ']' * 100000)
|
self.loads('[' * 100000 + '1' + ']' * 100000)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_highly_nested_objects_encoding(self):
|
def test_highly_nested_objects_encoding(self):
|
||||||
# See #12051
|
# See #12051
|
||||||
l, d = [], {}
|
l, d = [], {}
|
||||||
|
@ -93,6 +95,7 @@ class TestRecursion:
|
||||||
with support.infinite_recursion(5000):
|
with support.infinite_recursion(5000):
|
||||||
self.dumps(d)
|
self.dumps(d)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_endless_recursion(self):
|
def test_endless_recursion(self):
|
||||||
# See #12051
|
# See #12051
|
||||||
class EndlessJSONEncoder(self.json.JSONEncoder):
|
class EndlessJSONEncoder(self.json.JSONEncoder):
|
||||||
|
|
|
@ -9,7 +9,7 @@ import unittest
|
||||||
from pathlib._abc import UnsupportedOperation, ParserBase, PurePathBase, PathBase
|
from pathlib._abc import UnsupportedOperation, ParserBase, PurePathBase, PathBase
|
||||||
import posixpath
|
import posixpath
|
||||||
|
|
||||||
from test.support import is_wasi
|
from test.support import is_wasi, is_emscripten
|
||||||
from test.support.os_helper import TESTFN
|
from test.support.os_helper import TESTFN
|
||||||
|
|
||||||
|
|
||||||
|
@ -2298,6 +2298,7 @@ class DummyPathTest(DummyPurePathTest):
|
||||||
_check(path, "dirb/file*", False, ["dirB/fileB"])
|
_check(path, "dirb/file*", False, ["dirB/fileB"])
|
||||||
|
|
||||||
@needs_symlinks
|
@needs_symlinks
|
||||||
|
@unittest.skipIf(is_emscripten, "Hangs")
|
||||||
def test_glob_recurse_symlinks_common(self):
|
def test_glob_recurse_symlinks_common(self):
|
||||||
def _check(path, glob, expected):
|
def _check(path, glob, expected):
|
||||||
actual = {path for path in path.glob(glob, recurse_symlinks=True)
|
actual = {path for path in path.glob(glob, recurse_symlinks=True)
|
||||||
|
@ -2393,6 +2394,7 @@ class DummyPathTest(DummyPurePathTest):
|
||||||
self.assertEqual(set(p.rglob("*\\")), { P(self.base, "dirC/dirD/") })
|
self.assertEqual(set(p.rglob("*\\")), { P(self.base, "dirC/dirD/") })
|
||||||
|
|
||||||
@needs_symlinks
|
@needs_symlinks
|
||||||
|
@unittest.skipIf(is_emscripten, "Hangs")
|
||||||
def test_rglob_recurse_symlinks_common(self):
|
def test_rglob_recurse_symlinks_common(self):
|
||||||
def _check(path, glob, expected):
|
def _check(path, glob, expected):
|
||||||
actual = {path for path in path.rglob(glob, recurse_symlinks=True)
|
actual = {path for path in path.rglob(glob, recurse_symlinks=True)
|
||||||
|
|
|
@ -2097,6 +2097,7 @@ class TracebackFormatMixin:
|
||||||
return e
|
return e
|
||||||
|
|
||||||
@cpython_only
|
@cpython_only
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_exception_group_deep_recursion_capi(self):
|
def test_exception_group_deep_recursion_capi(self):
|
||||||
from _testcapi import exception_print
|
from _testcapi import exception_print
|
||||||
LIMIT = 75
|
LIMIT = 75
|
||||||
|
@ -2108,6 +2109,7 @@ class TracebackFormatMixin:
|
||||||
self.assertIn('ExceptionGroup', output)
|
self.assertIn('ExceptionGroup', output)
|
||||||
self.assertLessEqual(output.count('ExceptionGroup'), LIMIT)
|
self.assertLessEqual(output.count('ExceptionGroup'), LIMIT)
|
||||||
|
|
||||||
|
@support.skip_emscripten_stack_overflow()
|
||||||
def test_exception_group_deep_recursion_traceback(self):
|
def test_exception_group_deep_recursion_traceback(self):
|
||||||
LIMIT = 75
|
LIMIT = 75
|
||||||
eg = self.deep_eg()
|
eg = self.deep_eg()
|
||||||
|
|
|
@ -57,6 +57,7 @@ class MiscTests(unittest.TestCase):
|
||||||
del element.attrib
|
del element.attrib
|
||||||
self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'})
|
self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'})
|
||||||
|
|
||||||
|
@unittest.skipIf(support.is_emscripten, "segfaults")
|
||||||
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')
|
||||||
|
|
1
configure
generated
vendored
1
configure
generated
vendored
|
@ -9436,6 +9436,7 @@ fi
|
||||||
as_fn_append LDFLAGS_NODIST " -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"
|
as_fn_append LDFLAGS_NODIST " -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"
|
||||||
as_fn_append LDFLAGS_NODIST " -sEXPORTED_RUNTIME_METHODS=FS,callMain"
|
as_fn_append LDFLAGS_NODIST " -sEXPORTED_RUNTIME_METHODS=FS,callMain"
|
||||||
as_fn_append LDFLAGS_NODIST " -sEXPORTED_FUNCTIONS=_main,_Py_Version"
|
as_fn_append LDFLAGS_NODIST " -sEXPORTED_FUNCTIONS=_main,_Py_Version"
|
||||||
|
as_fn_append LDFLAGS_NODIST " -sSTACK_SIZE=5MB"
|
||||||
|
|
||||||
if test "x$enable_wasm_dynamic_linking" = xyes
|
if test "x$enable_wasm_dynamic_linking" = xyes
|
||||||
then :
|
then :
|
||||||
|
|
|
@ -2334,6 +2334,7 @@ AS_CASE([$ac_sys_system],
|
||||||
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"])
|
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"])
|
||||||
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sEXPORTED_RUNTIME_METHODS=FS,callMain"])
|
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sEXPORTED_RUNTIME_METHODS=FS,callMain"])
|
||||||
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sEXPORTED_FUNCTIONS=_main,_Py_Version"])
|
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sEXPORTED_FUNCTIONS=_main,_Py_Version"])
|
||||||
|
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sSTACK_SIZE=5MB"])
|
||||||
|
|
||||||
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
|
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
|
||||||
AS_VAR_APPEND([LINKFORSHARED], [" -sMAIN_MODULE"])
|
AS_VAR_APPEND([LINKFORSHARED], [" -sMAIN_MODULE"])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue