diff options
| author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-10-25 15:36:51 +0200 |
|---|---|---|
| committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-10-25 15:36:51 +0200 |
| commit | f901d5ae8f44fdd73d2bd9f02d160bc3856e1fc8 (patch) | |
| tree | 773903779668e0432a23028a759a3041918279e3 | |
| parent | 82c9e7e70ce64c7d353fa0042279cb1e193803a0 (diff) | |
| download | pylint-f901d5ae8f44fdd73d2bd9f02d160bc3856e1fc8.tar.gz | |
fix tests broken due to Windows line ending or by output format change introduced in ed904ee30bc5
| -rw-r--r-- | test/messages/func_bad_context_manager.txt | 6 | ||||
| -rw-r--r-- | test/messages/func_unpacking_non_sequence.txt | 14 | ||||
| -rw-r--r-- | test/unittest_lint.py | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/test/messages/func_bad_context_manager.txt b/test/messages/func_bad_context_manager.txt index 1634546..1b5d5d5 100644 --- a/test/messages/func_bad_context_manager.txt +++ b/test/messages/func_bad_context_manager.txt @@ -1,3 +1,3 @@ -E: 40:FirstBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback
-E: 49:SecondBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback
-E: 58:ThirdBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback
+E: 40:FirstBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback +E: 49:SecondBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback +E: 58:ThirdBadContextManager.__exit__: __exit__ must accept 3 arguments: type, value, traceback diff --git a/test/messages/func_unpacking_non_sequence.txt b/test/messages/func_unpacking_non_sequence.txt index 5023de3..087eb0e 100644 --- a/test/messages/func_unpacking_non_sequence.txt +++ b/test/messages/func_unpacking_non_sequence.txt @@ -1,7 +1,7 @@ -W: 61: Attempting to unpack a non-sequence with non-sequence at line 52
-W: 63: Attempting to unpack a non-sequence with non-sequence at line 63
-W: 64: Attempting to unpack a non-sequence with non-sequence at line 64
-W: 65: Attempting to unpack a non-sequence with non-sequence at line 9 (input.unpacking)
-W: 66: Attempting to unpack a non-sequence with non-sequence at line 11 (input.unpacking)
-W: 67: Attempting to unpack a non-sequence with non-sequence at line 58
-W: 68: Attempting to unpack a non-sequence with non-sequence at line unknown (sys)
\ No newline at end of file +W: 61: Attempting to unpack a non-sequence with non-sequence at line 52 +W: 63: Attempting to unpack a non-sequence with non-sequence at line 63 +W: 64: Attempting to unpack a non-sequence with non-sequence at line 64 +W: 65: Attempting to unpack a non-sequence with non-sequence at line 9 (input.unpacking) +W: 66: Attempting to unpack a non-sequence with non-sequence at line 11 (input.unpacking) +W: 67: Attempting to unpack a non-sequence with non-sequence at line 58 +W: 68: Attempting to unpack a non-sequence with non-sequence at line unknown (sys) diff --git a/test/unittest_lint.py b/test/unittest_lint.py index db2a6c7..f6ed6a2 100644 --- a/test/unittest_lint.py +++ b/test/unittest_lint.py @@ -86,12 +86,12 @@ class PyLinterTC(TestCase): def test_message_help(self): msg = self.linter.check_message_id('F0001') self.assertMultiLineEqual( - ''':F0001 (fatal): + ''':fatal (F0001): Used when an error occurred preventing the analysis of a module (unable to find it for instance). This message belongs to the master checker.''', msg.format_help(checkerref=True)) self.assertMultiLineEqual( - ''':F0001 (fatal): + ''':fatal (F0001): Used when an error occurred preventing the analysis of a module (unable to find it for instance).''', msg.format_help(checkerref=False)) @@ -101,13 +101,13 @@ class PyLinterTC(TestCase): msg = build_message_def(self.linter._checkers['typecheck'][0], 'E1122', checkers.typecheck.MSGS['E1122']) self.assertMultiLineEqual( - ''':E1122 (duplicate-keyword-arg): *Duplicate keyword argument %r in function call* + ''':duplicate-keyword-arg (E1122): *Duplicate keyword argument %r in function call* Used when a function call passes the same keyword argument multiple times. This message belongs to the typecheck checker. It can't be emitted when using Python >= 2.6.''', msg.format_help(checkerref=True)) self.assertMultiLineEqual( - ''':E1122 (duplicate-keyword-arg): *Duplicate keyword argument %r in function call* + ''':duplicate-keyword-arg (E1122): *Duplicate keyword argument %r in function call* Used when a function call passes the same keyword argument multiple times. This message can't be emitted when using Python >= 2.6.''', msg.format_help(checkerref=False)) @@ -261,7 +261,7 @@ class PyLinterTC(TestCase): finally: sys.stdout = sys.__stdout__ # cursory examination of the output: we're mostly testing it completes - self.assertTrue(':C0112 (empty-docstring): *Empty %s docstring*' in output) + self.assertIn(':empty-docstring (C0112): *Empty %s docstring*', output) def test_lint_ext_module_with_file_output(self): self.linter.set_reporter(text.TextReporter()) |
