Exemple #1
0
 def test_print_filename_LocalBear(self):
     self.uut = LocalBear(self.settings, self.queue)
     self.uut.execute('filename.py', 'file\n')
     self.check_message(LOG_LEVEL.DEBUG)
     # Fails because of no run() implementation
     self.check_message(LOG_LEVEL.WARNING,
                        'Bear LocalBear failed to run on file filename.py. '
                        'Take a look at debug messages (`-V`) for further '
                        'information.')
Exemple #2
0
 def test_no_warning_debug_enabled_LocalBear(self):
     self.settings.append(Setting('log_level', 'DEBUG'))
     self.uut = LocalBear(self.settings, self.queue)
     self.uut.execute('filename.py', 'file\n')
     self.check_message(LOG_LEVEL.DEBUG, 'Running bear LocalBear...')
     # Fails because of no run() implementation
     self.check_message(
         LOG_LEVEL.DEBUG, 'The bear LocalBear raised an exception. If you '
         'are the author of this bear, please make sure to '
         'catch all exceptions. If not and this error '
         'annoys you, you might want to get in contact with '
         'the author of this bear.\n\nTraceback information '
         'is provided below:', True)
     self.assertRaises(NotImplementedError)
 def __init__(self):
     LocalBear.__init__(self, [], "", Section("irrelevant"), None)
Exemple #4
0
 def __init__(self):
     LocalBear.__init__(self, [], "", Section("irrelevant"), None)
 def __init__(self):
     LocalBear.__init__(self, [], '', Section('irrelevant'), None)
Exemple #6
0
 def test_api(self):
     test_object = LocalBear(Section("name"), None)
     self.assertRaises(NotImplementedError, test_object.run, "filename",
                       ["file\n"])
Exemple #7
0
 def test_kind(self):
     self.assertEqual(LocalBear.kind(), BEAR_KIND.LOCAL)
 def test_kind(self):
     self.assertEqual(LocalBear.kind(), BEAR_KIND.LOCAL)
Exemple #9
0
 def __init__(self):
     LocalBear.__init__(self, [], '', Section('irrelevant'), None)
Exemple #10
0
 def test_api(self):
     test_object = LocalBear(Section('name'), None)
     self.assertRaises(NotImplementedError, test_object.run, 'filename',
                       ['file\n'])