Beispiel #1
0
 def test_empty_fixme_regex(self):
     with create_file_backed_module(
         """a = 1
         # fixme
         """) as module:
         with self.assertNoMessages():
             self.checker.process_module(module)
Beispiel #2
0
 def test_todo_without_message(self):
     with create_file_backed_module("""a = 1
             # TODO
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'TODO')):
             self.checker.process_module(module)
Beispiel #3
0
 def test_fixme(self):
     with create_file_backed_module(
         """a = 1
         # FIXME """) as module:
         with self.assertAddsMessages(
             Message(msg_id='fixme', line=2, args=u'FIXME')):
             self.checker.process_module(module)
Beispiel #4
0
 def test_xxx_without_space(self):
     with create_file_backed_module("""a = 1
             #XXX
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'XXX')):
             self.checker.process_module(module)
Beispiel #5
0
 def test_xxx_middle(self):
     with create_file_backed_module(
             """a = 1
             # midle XXX
             """) as module:
         with self.assertNoMessages():
             self.checker.process_module(module)
Beispiel #6
0
 def test_other_present_codetag(self):
     with create_file_backed_module("""a = 1
             # CODETAG
             # FIXME
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'CODETAG')):
             self.checker.process_module(module)
Beispiel #7
0
 def test_absent_codetag(self):
     with create_file_backed_module("""a = 1
             # FIXME
             # TODO
             # XXX
             """) as module:
         with self.assertNoMessages():
             self.checker.process_module(module)
Beispiel #8
0
 def test_xxx_without_space(self):
     with create_file_backed_module(
             """a = 1
             #XXX
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'XXX')):
             self.checker.process_module(module)
Beispiel #9
0
 def test_todo_without_message(self):
     with create_file_backed_module(
             """a = 1
             # TODO
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'TODO')):
             self.checker.process_module(module)
Beispiel #10
0
 def test_other_present_codetag(self):
     with create_file_backed_module(
             """a = 1
             # CODETAG
             # FIXME
             """) as module:
         with self.assertAddsMessages(
                 Message(msg_id='fixme', line=2, args=u'CODETAG')):
             self.checker.process_module(module)
Beispiel #11
0
 def test_absent_codetag(self):
     with create_file_backed_module(
             """a = 1
             # FIXME
             # TODO
             # XXX
             """) as module:
         with self.assertNoMessages():
             self.checker.process_module(module)
Beispiel #12
0
 def test_xxx_middle(self):
     with create_file_backed_module("""a = 1
             # midle XXX
             """) as module:
         with self.assertNoMessages():
             self.checker.process_module(module)