diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2022-05-22 08:26:21 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-05-25 10:58:48 +0200 |
| commit | 8cf4de206ce4e1fe1e06a55a30c4e6bebe7cf10a (patch) | |
| tree | f9abbdabd7e7da2f237092458b51d4407607e86c /tests/decorators | |
| parent | aff649a3bd0c4fd8f7d859464f0eb907e877443f (diff) | |
Normalized decorator style for functools.wraps.
Diffstat (limited to 'tests/decorators')
| -rw-r--r-- | tests/decorators/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |
