summaryrefslogtreecommitdiff
path: root/pylint/test
diff options
context:
space:
mode:
authorTaewon D. Kim <kimt33@mcmaster.ca>2019-03-23 08:32:57 -0400
committerClaudiu Popa <pcmanticore@gmail.com>2019-03-27 14:31:04 +0100
commitb14d5e950f69571a3109e7cfb2d91614dadb66f3 (patch)
treec03532b16406d22e422d26040e050ded371865a8 /pylint/test
parent24687f5dfbaf03bb35d9b5d788b67ce7b5d416d0 (diff)
downloadpylint-git-b14d5e950f69571a3109e7cfb2d91614dadb66f3.tar.gz
Add/modify tests for checking raw docstring in Similarities checker
- Add an extra case to the examples used to test similarities checker - Modify outputs of tests (total number of lines and the percent changed)
Diffstat (limited to 'pylint/test')
-rw-r--r--pylint/test/input/similar18
-rw-r--r--pylint/test/input/similar28
-rw-r--r--pylint/test/unittest_checker_similar.py8
3 files changed, 20 insertions, 4 deletions
diff --git a/pylint/test/input/similar1 b/pylint/test/input/similar1
index 2b04ee2f5..a533e2f6f 100644
--- a/pylint/test/input/similar1
+++ b/pylint/test/input/similar1
@@ -20,3 +20,11 @@ fifteen
sixteen
seventeen
eighteen
+
+
+
+
+nineteen
+r"""
+twenty
+"""
diff --git a/pylint/test/input/similar2 b/pylint/test/input/similar2
index 77f5f1ed6..79bcab2fd 100644
--- a/pylint/test/input/similar2
+++ b/pylint/test/input/similar2
@@ -20,3 +20,11 @@ FIFTEEN
sixteen
seventeen
eighteen
+
+
+
+
+NINETEEN
+r"""
+twenty
+"""
diff --git a/pylint/test/unittest_checker_similar.py b/pylint/test/unittest_checker_similar.py
index a84883372..7470e06c9 100644
--- a/pylint/test/unittest_checker_similar.py
+++ b/pylint/test/unittest_checker_similar.py
@@ -48,7 +48,7 @@ def test_ignore_comments():
eight
nine
''' ten
-TOTAL lines=44 duplicates=10 percent=22.73
+TOTAL lines=60 duplicates=10 percent=16.67
"""
% (SIMILAR1, SIMILAR2)
).strip()
@@ -84,7 +84,7 @@ def test_ignore_docsrings():
three
four
five
-TOTAL lines=44 duplicates=13 percent=29.55
+TOTAL lines=60 duplicates=13 percent=21.67
"""
% ((SIMILAR1, SIMILAR2) * 2)
).strip()
@@ -99,7 +99,7 @@ def test_ignore_imports():
assert (
output.getvalue().strip()
== """
-TOTAL lines=44 duplicates=0 percent=0.00
+TOTAL lines=60 duplicates=0 percent=0.00
""".strip()
)
@@ -169,7 +169,7 @@ def test_ignore_nothing():
three
four
five
-TOTAL lines=44 duplicates=5 percent=11.36
+TOTAL lines=60 duplicates=5 percent=8.33
"""
% (SIMILAR1, SIMILAR2)
).strip()