24
24
class TestParamDocChecker (CheckerTestCase ):
25
25
"""Tests for pylint_plugin.ParamDocChecker"""
26
26
CHECKER_CLASS = DocstringParameterChecker
27
+ CONFIG = {
28
+ 'accept_no_param_doc' : False ,
29
+ }
27
30
28
31
def test_missing_func_params_in_sphinx_docstring (self ):
29
32
"""Example of a function with missing Sphinx parameter documentation in
@@ -167,6 +170,7 @@ def function_foo(x, y, z):
167
170
):
168
171
self .checker .visit_functiondef (node )
169
172
173
+ @set_config (accept_no_param_doc = True )
170
174
def test_tolerate_no_param_documentation_at_all (self ):
171
175
"""Example of a function with no parameter documentation at all
172
176
@@ -182,7 +186,6 @@ def function_foo(x, y):
182
186
with self .assertNoMessages ():
183
187
self .checker .visit_functiondef (node )
184
188
185
- @set_config (accept_no_param_doc = False )
186
189
def test_don_t_tolerate_no_param_documentation_at_all (self ):
187
190
"""Example of a function with no parameter documentation at all
188
191
@@ -207,7 +210,6 @@ def function_foo(x, y):
207
210
):
208
211
self .checker .visit_functiondef (node )
209
212
210
- @set_config (accept_no_param_doc = False )
211
213
def test_see_tolerate_no_param_documentation_at_all (self ):
212
214
"""Example for the usage of "For the parameters, see"
213
215
to suppress missing-param warnings.
@@ -841,7 +843,6 @@ def __init__(self, x, y):
841
843
):
842
844
self ._visit_methods_of_class (node )
843
845
844
- @set_config (accept_no_param_doc = False )
845
846
def test_see_sentence_for_constr_params_in_class (self ):
846
847
"""Example usage of "For the parameters, see" in class docstring"""
847
848
node = astroid .extract_node ("""
@@ -859,7 +860,6 @@ def __init__(self, x, y):
859
860
with self .assertNoMessages ():
860
861
self ._visit_methods_of_class (node )
861
862
862
- @set_config (accept_no_param_doc = False )
863
863
def test_see_sentence_for_constr_params_in_init (self ):
864
864
"""Example usage of "For the parameters, see" in init docstring"""
865
865
node = astroid .extract_node ("""
0 commit comments