Commits

Sylvain Thénault  committed 656d711

fix tests broken due to Windows line ending or by output format change introduced in ed904ee30bc5

  • Participants
  • Parent commits afc2d22

Comments (0)

Files changed (3)

File test/messages/func_bad_context_manager.txt

-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

File test/messages/func_unpacking_non_sequence.txt

-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)
+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)

File test/unittest_lint.py

     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))
         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))
         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())