MCPcopy Index your code
hub / github.com/RustPython/RustPython / __exit__

Method __exit__

Lib/unittest/case.py:351–363  ·  view source on GitHub ↗
(self, exc_type, exc_value, tb)

Source from the content-addressed store, hash-verified

349class _AssertNotWarnsContext(_AssertWarnsContext):
350
351 def __exit__(self, exc_type, exc_value, tb):
352 self.warnings_manager.__exit__(exc_type, exc_value, tb)
353 if exc_type is not None:
354 # let unexpected exceptions pass through
355 return
356 try:
357 exc_name = self.expected.__name__
358 except AttributeError:
359 exc_name = str(self.expected)
360 for m in self.warnings:
361 w = m.message
362 if isinstance(w, self.expected):
363 self._raiseFailure(f"{exc_name} triggered")
364
365
366class _OrderedChainMap(collections.ChainMap):

Callers

nothing calls this directly

Calls 4

strFunction · 0.85
isinstanceFunction · 0.85
_raiseFailureMethod · 0.80
__exit__Method · 0.45

Tested by

no test coverage detected