Esempio n. 1
0
 def test_exception(self):
     try:
         self._inner_raise(3)
     except Exception as e:
         self.assertEqual(u"Exception: throwing exception",
                          exception_to_unicode(e))
         occurences = filter(lambda s: "_inner_raise" in s,
                             exception_to_unicode(e, True).split('\n'))
         self.assertEqual(len(occurences), 8)
Esempio n. 2
0
 def _log_error(item, e):
     ue = exception_to_unicode(e)
     if isinstance(e, DistributionNotFound):
         env.log.debug('Skipping "%s": ("%s" not found)', item, ue)
     elif isinstance(e, VersionConflict):
         env.log.error('Skipping "%s": (version conflict "%s")',
                       item, ue)
     elif isinstance(e, UnknownExtra):
         env.log.error('Skipping "%s": (unknown extra "%s")', item, ue)
     else:
         env.log.error('Skipping "%s": %s', item,
                       exception_to_unicode(e, traceback=True))
Esempio n. 3
0
 def _log_error(item, e):
     ue = exception_to_unicode(e)
     if isinstance(e, DistributionNotFound):
         env.log.debug('Skipping "%s": ("%s" not found)', item, ue)
     elif isinstance(e, VersionConflict):
         env.log.error('Skipping "%s": (version conflict "%s")', item,
                       ue)
     elif isinstance(e, UnknownExtra):
         env.log.error('Skipping "%s": (unknown extra "%s")', item, ue)
     else:
         env.log.error('Skipping "%s": %s', item,
                       exception_to_unicode(e, traceback=True))
Esempio n. 4
0
 def test_exception(self):
     try:
         self._inner_raise(3)
     except Exception as e:
         self.assertEqual(
             u"Exception: throwing exception",
             exception_to_unicode(e)
         )
         occurences = filter(
             lambda s: "_inner_raise" in s,
             exception_to_unicode(e, True).split('\n')
         )
         self.assertEqual(len(occurences), 8)