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

Method __exit__

extra_tests/snippets/testutils.py:24–32  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

22 return self
23
24 def __exit__(self, exc_type, exc_val, exc_tb):
25 if exc_type is None:
26 failmsg = self.failmsg or "{} was not raised".format(self.expected.__name__)
27 assert False, failmsg
28 if not issubclass(exc_type, self.expected):
29 return False
30
31 self.exception = exc_val
32 return True
33
34
35class TestFailingBool:

Callers

nothing calls this directly

Calls 2

issubclassFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected