Skip to content

Commit 6b0267a

Browse files
committed
added test for parameter with bullet points and directories
1 parent 7c5375e commit 6b0267a

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

scripts/tests/test_validate_docstrings.py

+29-1
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,33 @@ def parameters_with_bullet_points1(self, method='min'):
281281
"""
282282
pass
283283

284+
def parameters_bullet_points_and_directives(self, axis='index',
285+
method='min'):
286+
"""
287+
Test bullets points and directories.
288+
289+
Parameters
290+
----------
291+
axis : {'index', 'columns'}, default 'index'
292+
Parameter introduction and one directive:
293+
294+
* 'index': the description for index
295+
* 'columns': the description for columns
296+
297+
.. versionchanged:: 0.1.2
298+
299+
method : {'min', 'max'}, default 'min'
300+
Parameter introduction and two directives:
301+
302+
* 'min': the description for min
303+
* 'max': the description for max
304+
305+
.. versionadded:: 0.1.2
306+
.. deprecated:: 0.00.0
307+
A description
308+
"""
309+
pass
310+
284311

285312
class BadGenericDocStrings(object):
286313
"""Everything here has a bad docstring
@@ -836,7 +863,8 @@ def test_good_class(self, capsys):
836863
@pytest.mark.parametrize("func", [
837864
'plot', 'sample', 'random_letters', 'sample_values', 'head', 'head1',
838865
'contains', 'mode', 'good_imports', 'no_returns', 'empty_returns',
839-
'parameters_with_bullet_points', 'parameters_with_bullet_points1'])
866+
'parameters_with_bullet_points', 'parameters_with_bullet_points1',
867+
'parameters_bullet_points_and_directives'])
840868
def test_good_functions(self, capsys, func):
841869
errors = validate_one(self._import_path(
842870
klass='GoodDocStrings', func=func))['errors']

0 commit comments

Comments
 (0)