summaryrefslogtreecommitdiff
path: root/pylint/test
diff options
context:
space:
mode:
authorLuis Escobar <lescobar@vauxoo.com>2016-04-15 02:05:26 +0000
committerLuis Escobar <lescobar@vauxoo.com>2016-04-15 02:05:26 +0000
commit3667b91f26c1874e0bc62903b150f657bf0cd2d4 (patch)
tree4eec677c51690f428a830fa1bbd3744d4587c76b /pylint/test
parentaba192ca4eb931364ec13abfc60a9eed628bfa0c (diff)
downloadpylint-git-3667b91f26c1874e0bc62903b150f657bf0cd2d4.tar.gz
[FIX] Use linecache intead open and add new test case with carriage return
Diffstat (limited to 'pylint/test')
-rw-r--r--pylint/test/extensions/data/docstring.py6
-rw-r--r--pylint/test/extensions/test_docstring_add.py4
2 files changed, 8 insertions, 2 deletions
diff --git a/pylint/test/extensions/data/docstring.py b/pylint/test/extensions/data/docstring.py
index 563280f11..5fb49e86e 100644
--- a/pylint/test/extensions/data/docstring.py
+++ b/pylint/test/extensions/data/docstring.py
@@ -2,9 +2,13 @@
def check_messages(*messages):
- """docstring"""
+ """
+ docstring"""
return messages
+def function2():
+ """Test Ok"""
+ pass
class FFFF(object):
"""
diff --git a/pylint/test/extensions/test_docstring_add.py b/pylint/test/extensions/test_docstring_add.py
index 6fd844e42..3e894003c 100644
--- a/pylint/test/extensions/test_docstring_add.py
+++ b/pylint/test/extensions/test_docstring_add.py
@@ -22,6 +22,7 @@ class TestReporter(BaseReporter):
class CheckDocStringAddicTC(unittest.TestCase):
expected_msg = [
+ 'First line empty in function docstring',
'First line empty in class docstring',
'Bad docstring quotes in method, expected """, given \'\'\'',
'Bad docstring quotes in method, expected """, given "',
@@ -30,6 +31,7 @@ class CheckDocStringAddicTC(unittest.TestCase):
]
expected_symbol = [
'docstring-first-line-empty',
+ 'docstring-first-line-empty',
'bad-docstring-quotes',
'bad-docstring-quotes',
'bad-docstring-quotes',
@@ -48,7 +50,7 @@ class CheckDocStringAddicTC(unittest.TestCase):
'docstring.py')
self._linter.check([docstring_test])
msgs = self._linter.reporter.messages
- self.assertEqual(len(msgs), 5)
+ self.assertEqual(len(msgs), 6)
for msg, expected_symbol, expected_msg in zip(msgs,
self.expected_symbol,
self.expected_msg):