summaryrefslogtreecommitdiff
path: root/pylint/test/functional/docstrings.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-02-17 01:09:04 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-02-17 01:09:04 +0200
commitd00adfbdc7b77280f6a7c97e39cb882b853da1d8 (patch)
tree26722500b372c31cda2f8e49701fe5735171684b /pylint/test/functional/docstrings.py
parentfe36ec0486cfc9aba10d8d87b0f42077ad1e78db (diff)
parent1dc09ef472a1bc0ca312c7cd8a1a3c700b510b47 (diff)
downloadpylint-d00adfbdc7b77280f6a7c97e39cb882b853da1d8.tar.gz
The HTML output accepts the `--msg-template` option.
Patch by Daniel Goldsmith. Closes issue #135.
Diffstat (limited to 'pylint/test/functional/docstrings.py')
-rw-r--r--pylint/test/functional/docstrings.py83
1 files changed, 83 insertions, 0 deletions
diff --git a/pylint/test/functional/docstrings.py b/pylint/test/functional/docstrings.py
new file mode 100644
index 0000000..8b92b08
--- /dev/null
+++ b/pylint/test/functional/docstrings.py
@@ -0,0 +1,83 @@
+# pylint: disable=R0201,print-statement
+# -1: [missing-docstring]
+__revision__ = ''
+
+# +1: [empty-docstring]
+def function0():
+ """"""
+
+# +1: [missing-docstring]
+def function1(value):
+ # missing docstring
+ print value
+
+def function2(value):
+ """docstring"""
+ print value
+
+def function3(value):
+ """docstring"""
+ print value
+
+# +1: [missing-docstring]
+class AAAA(object):
+ # missing docstring
+
+## class BBBB:
+## # missing docstring
+## pass
+
+## class CCCC:
+## """yeah !"""
+## def method1(self):
+## pass
+
+## def method2(self):
+## """ yeah !"""
+## pass
+
+ # +1: [missing-docstring]
+ def method1(self):
+ pass
+
+ def method2(self):
+ """ yeah !"""
+ pass
+
+ # +1: [empty-docstring]
+ def method3(self):
+ """"""
+ pass
+
+ def __init__(self):
+ pass
+
+class DDDD(AAAA):
+ """yeah !"""
+
+ def __init__(self):
+ AAAA.__init__(self)
+
+ # +1: [empty-docstring]
+ def method2(self):
+ """"""
+ pass
+
+ def method3(self):
+ pass
+
+ # +1: [missing-docstring]
+ def method4(self):
+ pass
+
+# pylint: disable=missing-docstring
+def function4():
+ pass
+
+# pylint: disable=empty-docstring
+def function5():
+ """"""
+ pass
+
+def function6():
+ """ I am a {} docstring.""".format("good")