From c2c1e6b4360b0d1c4de48a61187a2173321ec7b9 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 20 Apr 2020 15:16:21 +0100 Subject: [PATCH] Added line `@functools.wraps(method)` to the `fail_if_not_removed` decorator, which should fix https://github.com/briancurtin/deprecation/issues/42 (#48) --- deprecation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deprecation.py b/deprecation.py index e7903b4..27a67b2 100644 --- a/deprecation.py +++ b/deprecation.py @@ -275,6 +275,7 @@ def fail_if_not_removed(method): """ # NOTE(briancurtin): Unless this is named test_inner, nose won't work # properly. See Issue #32. + @functools.wraps(method) def test_inner(*args, **kwargs): with warnings.catch_warnings(record=True) as caught_warnings: warnings.simplefilter("always")