diff --git a/numpydoc/tests/test_validate.py b/numpydoc/tests/test_validate.py index 704a25ef..10f95e4f 100644 --- a/numpydoc/tests/test_validate.py +++ b/numpydoc/tests/test_validate.py @@ -384,6 +384,27 @@ def say_hello(): else: return None + def warnings(self): + """ + Do one thing. + + Sometimes, this function does other things. + + Warnings + -------- + This function may produce side effects when some condition + is met. + + See Also + -------- + related : Something related. + + Examples + -------- + >>> result = 1 + 1 + """ + pass + def multiple_variables_on_one_line(self, matrix, a, b, i, j): """ Swap two values in a matrix. @@ -1039,6 +1060,7 @@ def test_good_class(self, capsys): "no_returns", "empty_returns", "multiple_variables_on_one_line", + "warnings", ], ) def test_good_functions(self, capsys, func): diff --git a/numpydoc/validate.py b/numpydoc/validate.py index b33ea780..3c8d60ec 100644 --- a/numpydoc/validate.py +++ b/numpydoc/validate.py @@ -27,6 +27,7 @@ "Other Parameters", "Raises", "Warns", + "Warnings", "See Also", "Notes", "References",