mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #3747 from fanninpm/test-reprlib-3.10
Update test_reprlib.py to CPython 3.10
This commit is contained in:
6
Lib/test/test_reprlib.py
vendored
6
Lib/test/test_reprlib.py
vendored
@@ -198,6 +198,8 @@ class ReprTests(unittest.TestCase):
|
||||
r'int object at 0x[0-9A-Fa-f]+>')
|
||||
self.assertRegex(r(x), r'<cell at 0x.*\.\.\..*>')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_descriptors(self):
|
||||
eq = self.assertEqual
|
||||
# method descriptors
|
||||
@@ -209,9 +211,9 @@ class ReprTests(unittest.TestCase):
|
||||
class C:
|
||||
def foo(cls): pass
|
||||
x = staticmethod(C.foo)
|
||||
self.assertTrue(repr(x).startswith('<staticmethod object at 0x'))
|
||||
self.assertEqual(repr(x), f'<staticmethod({C.foo!r})>')
|
||||
x = classmethod(C.foo)
|
||||
self.assertTrue(repr(x).startswith('<classmethod object at 0x'))
|
||||
self.assertEqual(repr(x), f'<classmethod({C.foo!r})>')
|
||||
|
||||
def test_unsortable(self):
|
||||
# Repr.repr() used to call sorted() on sets, frozensets and dicts
|
||||
|
||||
Reference in New Issue
Block a user