From 8cf4de206ce4e1fe1e06a55a30c4e6bebe7cf10a Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 22 May 2022 08:26:21 +0200 Subject: Normalized decorator style for functools.wraps. --- tests/decorators/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/decorators/tests.py') diff --git a/tests/decorators/tests.py b/tests/decorators/tests.py index 38bf0c7ee1..70b03f6a3a 100644 --- a/tests/decorators/tests.py +++ b/tests/decorators/tests.py @@ -159,10 +159,11 @@ class DecoratorsTest(TestCase): # For testing method_decorator, a decorator that assumes a single argument. # We will get type arguments if there is a mismatch in the number of arguments. def simple_dec(func): + @wraps(func) def wrapper(arg): return func("test:" + arg) - return wraps(func)(wrapper) + return wrapper simple_dec_m = method_decorator(simple_dec) -- cgit v1.3