diff options
Diffstat (limited to 'pylint/test/unittest_checker_misc.py')
-rw-r--r-- | pylint/test/unittest_checker_misc.py | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/pylint/test/unittest_checker_misc.py b/pylint/test/unittest_checker_misc.py index c102338eb..5143698a0 100644 --- a/pylint/test/unittest_checker_misc.py +++ b/pylint/test/unittest_checker_misc.py @@ -14,8 +14,10 @@ from pylint.checkers import misc from pylint.testutils import ( - CheckerTestCase, Message, - set_config, _create_file_backed_module, + CheckerTestCase, + Message, + set_config, + _create_file_backed_module, ) @@ -24,66 +26,72 @@ class TestFixme(CheckerTestCase): def test_fixme_with_message(self): with _create_file_backed_module( - """a = 1 + """a = 1 # FIXME message - """) as module: + """ + ) as module: with self.assertAddsMessages( - Message(msg_id='fixme', line=2, args='FIXME message')): + Message(msg_id="fixme", line=2, args="FIXME message") + ): self.checker.process_module(module) def test_todo_without_message(self): with _create_file_backed_module( - """a = 1 + """a = 1 # TODO - """) as module: - with self.assertAddsMessages( - Message(msg_id='fixme', line=2, args='TODO')): + """ + ) as module: + with self.assertAddsMessages(Message(msg_id="fixme", line=2, args="TODO")): self.checker.process_module(module) def test_xxx_without_space(self): with _create_file_backed_module( - """a = 1 + """a = 1 #XXX - """) as module: - with self.assertAddsMessages( - Message(msg_id='fixme', line=2, args='XXX')): + """ + ) as module: + with self.assertAddsMessages(Message(msg_id="fixme", line=2, args="XXX")): self.checker.process_module(module) def test_xxx_middle(self): with _create_file_backed_module( - """a = 1 + """a = 1 # midle XXX - """) as module: + """ + ) as module: with self.assertNoMessages(): self.checker.process_module(module) def test_without_space_fixme(self): with _create_file_backed_module( - """a = 1 + """a = 1 #FIXME - """) as module: - with self.assertAddsMessages( - Message(msg_id='fixme', line=2, args='FIXME')): + """ + ) as module: + with self.assertAddsMessages(Message(msg_id="fixme", line=2, args="FIXME")): self.checker.process_module(module) @set_config(notes=[]) def test_absent_codetag(self): with _create_file_backed_module( - """a = 1 + """a = 1 # FIXME # TODO # XXX - """) as module: + """ + ) as module: with self.assertNoMessages(): self.checker.process_module(module) - @set_config(notes=['CODETAG']) + @set_config(notes=["CODETAG"]) def test_other_present_codetag(self): with _create_file_backed_module( - """a = 1 + """a = 1 # CODETAG # FIXME - """) as module: + """ + ) as module: with self.assertAddsMessages( - Message(msg_id='fixme', line=2, args='CODETAG')): + Message(msg_id="fixme", line=2, args="CODETAG") + ): self.checker.process_module(module) |