summaryrefslogtreecommitdiff
path: root/tests/functional/d/docstyle_extension.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-11-22 15:21:27 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-11-22 23:08:30 +0100
commit14f7b7cfcdeab557ee84478eb39654e029c90bfe (patch)
tree79a3be1d8c224162c3fb832ca36bf4dbeaa6b4ec /tests/functional/d/docstyle_extension.py
parent9e32192fe7bf77281d0dfbc107984b751983e113 (diff)
downloadpylint-git-migrate-extension-tests-to-functional.tar.gz
Migrate test for extension to functional testsmigrate-extension-tests-to-functional
This permit to upgrade the fixtures in pre-commit.
Diffstat (limited to 'tests/functional/d/docstyle_extension.py')
-rw-r--r--tests/functional/d/docstyle_extension.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/functional/d/docstyle_extension.py b/tests/functional/d/docstyle_extension.py
new file mode 100644
index 000000000..a5b6161b0
--- /dev/null
+++ b/tests/functional/d/docstyle_extension.py
@@ -0,0 +1,41 @@
+"""Checks of Dosctrings 'docstring-first-line-empty' 'bad-docstring-quotes'"""
+
+
+def check_messages(*messages): # [docstring-first-line-empty]
+ """
+ docstring"""
+ return messages
+
+
+def function2():
+ """Test Ok"""
+
+
+class FFFF: # [docstring-first-line-empty]
+ """
+ Test Docstring First Line Empty
+ """
+
+ def method1(self): # [docstring-first-line-empty, bad-docstring-quotes]
+ '''
+ Test Triple Single Quotes docstring
+ '''
+
+ def method2(self): # [bad-docstring-quotes]
+ "bad docstring 1"
+
+ def method3(self): # [bad-docstring-quotes]
+ 'bad docstring 2'
+
+ def method4(self): # [bad-docstring-quotes]
+ ' """bad docstring 3 '
+
+ @check_messages("bad-open-mode", "redundant-unittest-assert", "deprecated-module")
+ def method5(self):
+ """Test OK 1 with decorators"""
+
+ def method6(self):
+ r"""Test OK 2 with raw string"""
+
+ def method7(self):
+ u"""Test OK 3 with unicode string"""