Ejemplo n.º 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.')
Ejemplo n.º 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)
Ejemplo n.º 3
0
 def __init__(self):
     LocalBear.__init__(self, [], "", Section("irrelevant"), None)
Ejemplo n.º 4
0
 def __init__(self):
     LocalBear.__init__(self, [], "", Section("irrelevant"), None)
Ejemplo n.º 5
0
 def __init__(self):
     LocalBear.__init__(self, [], '', Section('irrelevant'), None)
Ejemplo n.º 6
0
 def test_api(self):
     test_object = LocalBear(Section("name"), None)
     self.assertRaises(NotImplementedError, test_object.run, "filename",
                       ["file\n"])
Ejemplo n.º 7
0
 def test_kind(self):
     self.assertEqual(LocalBear.kind(), BEAR_KIND.LOCAL)
Ejemplo n.º 8
0
 def test_kind(self):
     self.assertEqual(LocalBear.kind(), BEAR_KIND.LOCAL)
Ejemplo n.º 9
0
 def __init__(self):
     LocalBear.__init__(self, [], '', Section('irrelevant'), None)
Ejemplo n.º 10
0
 def test_api(self):
     test_object = LocalBear(Section('name'), None)
     self.assertRaises(NotImplementedError, test_object.run, 'filename',
                       ['file\n'])