summaryrefslogtreecommitdiff
path: root/pylint/test/functional/docstrings.py
diff options
context:
space:
mode:
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")