Skip to content

Commit eb802b1

Browse files
committed
Add Warnings to validate tests
1 parent d85f54e commit eb802b1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

numpydoc/tests/test_validate.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,27 @@ def say_hello():
384384
else:
385385
return None
386386

387+
def warnings(self):
388+
"""
389+
Do one thing.
390+
391+
Sometimes, this function does other things.
392+
393+
Warnings
394+
--------
395+
This function may produce side effects when some condition
396+
is met.
397+
398+
See Also
399+
--------
400+
related : Something related.
401+
402+
Examples
403+
--------
404+
>>> result = 1 + 1
405+
"""
406+
pass
407+
387408
def multiple_variables_on_one_line(self, matrix, a, b, i, j):
388409
"""
389410
Swap two values in a matrix.
@@ -1039,6 +1060,7 @@ def test_good_class(self, capsys):
10391060
"no_returns",
10401061
"empty_returns",
10411062
"multiple_variables_on_one_line",
1063+
"warnings",
10421064
],
10431065
)
10441066
def test_good_functions(self, capsys, func):

0 commit comments

Comments
 (0)