summaryrefslogtreecommitdiff
path: root/pylint/testutils/decorator.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/testutils/decorator.py')
-rw-r--r--pylint/testutils/decorator.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pylint/testutils/decorator.py b/pylint/testutils/decorator.py
index 3b70867cb..3fb5f190a 100644
--- a/pylint/testutils/decorator.py
+++ b/pylint/testutils/decorator.py
@@ -11,13 +11,15 @@ def set_config(**kwargs):
def _wrapper(fun):
@functools.wraps(fun)
- def _forward(self):
+ def _forward(self, *args, **test_function_kwargs):
for key, value in kwargs.items():
setattr(self.checker.config, key, value)
if isinstance(self, CheckerTestCase):
# reopen checker in case, it may be interested in configuration change
self.checker.open()
- fun(self)
+ fun(
+ self, *args, **test_function_kwargs
+ ) # Passing the args and kwargs back to the test function itself allows this decorator to be used on parametrized test cases
return _forward