gh-119011: type.__type_params__ now return an empty tuple (#119296)

This commit is contained in:
Nikita Sobolev 2024-05-28 21:12:58 +03:00 committed by GitHub
parent ae11d68ab9
commit 6b240c2308
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 0 deletions

View file

@ -710,6 +710,14 @@ class TestUpdateWrapper(unittest.TestCase):
self.assertTrue(wrapper.__doc__.startswith('max('))
self.assertEqual(wrapper.__annotations__, {})
def test_update_type_wrapper(self):
def wrapper(*args): pass
functools.update_wrapper(wrapper, type)
self.assertEqual(wrapper.__name__, 'type')
self.assertEqual(wrapper.__annotations__, {})
self.assertEqual(wrapper.__type_params__, ())
class TestWraps(TestUpdateWrapper):