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