예제 #1
0
 def test_loggable_log_exc_obj(self):
     loggable = Loggable()
     exc = TypeError(u"Message")
     with self.assertRaises(TypeError):
         loggable.log_exc(u"Message", exc, True, TypeError)
         self.assertEqual(len(loggable.logger), 1)
예제 #2
0
 def test_loggable_log_exc_crit_no_raise(self):
     loggable = Loggable()
     loggable.log_exc(u"Message", None, True, None)
     self.assertEqual(len(loggable.logger), 1)
예제 #3
0
 def test_loggable_log_exc_crit_raise(self):
     loggable = Loggable()
     with self.assertRaises(TypeError):
         loggable.log_exc(u"Message", None, True, TypeError)
         self.assertEqual(len(loggable.logger), 1)
예제 #4
0
 def test_loggable_log_exc_warn(self):
     loggable = Loggable()
     loggable.log_exc(u"Message", None, False, None)
     self.assertEqual(len(loggable.logger), 1)
예제 #5
0
 def test_loggable_log_exc_obj(self):
     loggable = Loggable()
     exc = TypeError(u"Message")
     with self.assertRaises(TypeError):
         loggable.log_exc(u"Message", exc, True, TypeError)
         self.assertEqual(len(loggable.logger), 1)
예제 #6
0
 def test_loggable_log_exc_crit_raise(self):
     loggable = Loggable()
     with self.assertRaises(TypeError):
         loggable.log_exc(u"Message", None, True, TypeError)
         self.assertEqual(len(loggable.logger), 1)
예제 #7
0
 def test_loggable_log_exc_crit_no_raise(self):
     loggable = Loggable()
     loggable.log_exc(u"Message", None, True, None)
     self.assertEqual(len(loggable.logger), 1)
예제 #8
0
 def test_loggable_log_exc_warn(self):
     loggable = Loggable()
     loggable.log_exc(u"Message", None, False, None)
     self.assertEqual(len(loggable.logger), 1)