Skip to content

Commit 0736846

Browse files
committed
Update tests
1 parent 8627478 commit 0736846

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,9 +4021,9 @@ def __init__(self, b):
40214021
def test_signature_on_class_with_decorated_new(self):
40224022
def identity(func):
40234023
@functools.wraps(func)
4024-
def wrapper(*args, **kwargs):
4024+
def wrapped(*args, **kwargs):
40254025
return func(*args, **kwargs)
4026-
return wrapper
4026+
return wrapped
40274027

40284028
class Foo:
40294029
@identity
@@ -4044,18 +4044,18 @@ def __new__(cls, a, b):
40444044
class Bar:
40454045
__new__ = identity(object.__new__)
40464046

4047-
object_new_signature = (
4047+
varargs_signature = (
40484048
(('args', ..., ..., 'var_positional'),
40494049
('kwargs', ..., ..., 'var_keyword')),
40504050
...,
40514051
)
40524052

40534053
self.assertEqual(self.signature(Bar), ((), ...))
4054-
self.assertEqual(self.signature(Bar.__new__), object_new_signature)
4054+
self.assertEqual(self.signature(Bar.__new__), varargs_signature)
40554055
self.assertEqual(self.signature(Bar, follow_wrapped=False),
4056-
object_new_signature)
4056+
varargs_signature)
40574057
self.assertEqual(self.signature(Bar.__new__, follow_wrapped=False),
4058-
object_new_signature)
4058+
varargs_signature)
40594059

40604060
def test_signature_on_class_with_init(self):
40614061
class C:

0 commit comments

Comments
 (0)