Пример #1
0
    def handle_error(self, context, type, value, tb):
        type, value, tb = self._normalize_exception(type, value, tb)

        if issubclass(type, self.EXPECTED_TEST_ERROR):
            # Don't print these to cut down on the noise in the test logs
            return
        return Hub.handle_error(self, context, type, value, tb)
Пример #2
0
    def handle_error(self, context, type, value, tb):
        type, value, tb = self._normalize_exception(type, value, tb)
        # If we check that the ``type`` is a subclass of ``EXPECTED_TEST_ERROR``,
        # and return, we completely change the semantics: We avoid raising
        # this error in the main greenlet, which cuts out several switches.
        # Overall, not good.

        if self.IGNORE_EXPECTED_TEST_ERROR and issubclass(
                type, self.EXPECTED_TEST_ERROR):
            # Don't pass these up; avoid switches
            return
        return Hub.handle_error(self, context, type, value, tb)
Пример #3
0
 def handle_error(self, context, type, value, tb):
     if issubclass(type, self.EXPECTED_TEST_ERROR):
         # Don't print these to cut down on the noise in the test logs
         return
     return Hub.handle_error(self, context, type, value, tb)