mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Update test_functools.py from 3.14.3
This commit is contained in:
1 parent
9676a1a5dd
commit
1d64b4991f
1 file changed
+5
-16
Vendored
+5
-16
@@ -438,6 +438,7 @@ class TestPartial:
|
||||
self.assertIs(type(r[0]), tuple)
|
||||
|
||||
@support.skip_if_sanitizer("thread sanitizer crashes in __tsan::FuncEntry", thread=True)
|
||||
@support.skip_if_unlimited_stack_size
|
||||
@support.skip_emscripten_stack_overflow()
|
||||
def test_recursive_pickle(self):
|
||||
with replaced_module('functools', self.module):
|
||||
@@ -1225,14 +1226,6 @@ class TestCmpToKeyC(TestCmpToKey, unittest.TestCase):
|
||||
return super().test_sort_int_str()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class TestCmpToKeyPy(TestCmpToKey, unittest.TestCase):
|
||||
cmp_to_key = staticmethod(py_functools.cmp_to_key)
|
||||
|
||||
@@ -2181,6 +2174,7 @@ class TestLRU:
|
||||
@support.skip_on_s390x
|
||||
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
|
||||
@support.skip_if_sanitizer("requires deep stack", ub=True, thread=True)
|
||||
@support.skip_if_unlimited_stack_size
|
||||
@support.skip_emscripten_stack_overflow()
|
||||
def test_lru_recursion(self):
|
||||
|
||||
@@ -3488,16 +3482,11 @@ class TestSingleDispatch(unittest.TestCase):
|
||||
|
||||
def test_method_signatures(self):
|
||||
class A:
|
||||
def m(self, item, arg: int) -> str:
|
||||
return str(item)
|
||||
@classmethod
|
||||
def cm(cls, item, arg: int) -> str:
|
||||
return str(item)
|
||||
@functools.singledispatchmethod
|
||||
def func(self, item, arg: int) -> str:
|
||||
return str(item)
|
||||
@func.register
|
||||
def _(self, item, arg: bytes) -> str:
|
||||
def _(self, item: int, arg: bytes) -> str:
|
||||
return str(item)
|
||||
|
||||
@functools.singledispatchmethod
|
||||
@@ -3506,7 +3495,7 @@ class TestSingleDispatch(unittest.TestCase):
|
||||
return str(arg)
|
||||
@func.register
|
||||
@classmethod
|
||||
def _(cls, item, arg: bytes) -> str:
|
||||
def _(cls, item: int, arg: bytes) -> str:
|
||||
return str(item)
|
||||
|
||||
@functools.singledispatchmethod
|
||||
@@ -3515,7 +3504,7 @@ class TestSingleDispatch(unittest.TestCase):
|
||||
return str(arg)
|
||||
@func.register
|
||||
@staticmethod
|
||||
def _(item, arg: bytes) -> str:
|
||||
def _(item: int, arg: bytes) -> str:
|
||||
return str(item)
|
||||
|
||||
self.assertEqual(str(Signature.from_callable(A.func)),
|
||||
|
||||
Reference in new issue
Block a user