From 39c50fbf7e2187c4714c51e3b18eb73688ee377c Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Tue, 16 Jul 2024 13:17:09 -0500 Subject: [PATCH] pytest wrapper should return None, not result While the wrapper does need the output of the wrapped function for processing, pytest complains for any test function that returns data. Updates the wrapper function that processes mocked data to not return the wrapped function result. Closes #2118 --- napalm/base/test/getters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napalm/base/test/getters.py b/napalm/base/test/getters.py index dadd7699b..0b049cbca 100644 --- a/napalm/base/test/getters.py +++ b/napalm/base/test/getters.py @@ -90,7 +90,7 @@ def mock_wrapper(cls, test_case): attr.current_test = "" # Empty them to avoid side effects attr.current_test_case = "" # Empty them to avoid side effects - return result + return None @functools.wraps(func) def real_wrapper(cls, test_case):