MCPcopy Index your code
hub / github.com/python/cpython / _addClassOrModuleLevelException

Method _addClassOrModuleLevelException

Lib/unittest/suite.py:243–253  ·  view source on GitHub ↗
(self, result, exc, errorName,
                                        info=None)

Source from the content-addressed store, hash-verified

241 self._addClassOrModuleLevelException(result, exc, errorName, info)
242
243 def _addClassOrModuleLevelException(self, result, exc, errorName,
244 info=None):
245 error = _ErrorHolder(errorName)
246 addSkip = getattr(result, 'addSkip', None)
247 if addSkip is not None and isinstance(exc, case.SkipTest):
248 addSkip(error, str(exc))
249 else:
250 if not info:
251 result.addError(error, (type(exc), exc, exc.__traceback__))
252 else:
253 result.addError(error, info)
254
255 def _handleModuleTearDown(self, result):
256 previousModule = self._get_previous_module(result)

Callers 1

Calls 3

_ErrorHolderClass · 0.85
strFunction · 0.85
addErrorMethod · 0.45

Tested by

no test coverage detected