Skip to content

Commit a0f1724

Browse files
berker.salberkersal
berker.sal
authored andcommitted
Functional tests for docparams extension docstring-min-length fix
1 parent 1620e5d commit a0f1724

6 files changed

+51
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Tests for missing-raises-doc for non-specified style docstrings
2+
with accept-no-raise-doc = no and docstring-min-length = 3
3+
"""
4+
# pylint: disable=invalid-name, broad-exception-raised
5+
6+
# Example of a function that is less than 'docstring-min-length' config option
7+
# No error message is emitted.
8+
def test_skip_docstring_min_length():
9+
"""function is too short and is missing raise documentation"""
10+
raise Exception
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[MAIN]
2+
load-plugins = pylint.extensions.docparams
3+
4+
[BASIC]
5+
accept-no-raise-doc=no
6+
docstring-min-length=3
7+
no-docstring-rgx=^$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Tests for missing-return-doc for non-specified style docstrings
2+
with accept-no-return-doc = no and docstring-min-length = 3
3+
"""
4+
# pylint: disable=invalid-name
5+
6+
# Example of a function that is less than 'docstring-min-length' config option
7+
# No error message is emitted.
8+
def test_skip_docstring_min_length() -> None:
9+
"""function is too short and is missing return documentation"""
10+
return None
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[MAIN]
2+
load-plugins = pylint.extensions.docparams
3+
4+
[BASIC]
5+
accept-no-return-doc=no
6+
docstring-min-length=3
7+
no-docstring-rgx=^$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Tests for missing-yield-doc for non-specified style docstrings
2+
with accept-no-yields-doc = no and docstring-min-length = 3
3+
"""
4+
# pylint: disable=invalid-name
5+
6+
# Example of a function that is less than 'docstring-min-length' config option
7+
# No error message is emitted.
8+
def test_skip_docstring_min_length():
9+
"""function is too short and is missing yield documentation"""
10+
yield None
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[MAIN]
2+
load-plugins = pylint.extensions.docparams
3+
4+
[BASIC]
5+
accept-no-yields-doc=no
6+
docstring-min-length=3
7+
no-docstring-rgx=^$

0 commit comments

Comments
 (0)