Skip to content

Commit 39c50fb

Browse files
committed
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
1 parent 72ba65e commit 39c50fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

napalm/base/test/getters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def mock_wrapper(cls, test_case):
9090
attr.current_test = "" # Empty them to avoid side effects
9191
attr.current_test_case = "" # Empty them to avoid side effects
9292

93-
return result
93+
return None
9494

9595
@functools.wraps(func)
9696
def real_wrapper(cls, test_case):

0 commit comments

Comments
 (0)