diff options
author | Luis Escobar <lescobar@vauxoo.com> | 2016-04-15 02:05:26 +0000 |
---|---|---|
committer | Luis Escobar <lescobar@vauxoo.com> | 2016-04-15 02:05:26 +0000 |
commit | 3667b91f26c1874e0bc62903b150f657bf0cd2d4 (patch) | |
tree | 4eec677c51690f428a830fa1bbd3744d4587c76b /pylint/test | |
parent | aba192ca4eb931364ec13abfc60a9eed628bfa0c (diff) | |
download | pylint-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.py | 6 | ||||
-rw-r--r-- | pylint/test/extensions/test_docstring_add.py | 4 |
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): |