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

Method assertNoted

Lib/test/test_codecs.py:3171–3177  ·  view source on GitHub ↗
(self, operation, exc_type, msg)

Source from the content-addressed store, hash-verified

3169
3170 @contextlib.contextmanager
3171 def assertNoted(self, operation, exc_type, msg):
3172 full_msg = r"{} with {!r} codec failed".format(
3173 operation, self.codec_name)
3174 with self.assertRaises(exc_type) as caught:
3175 yield caught
3176 self.assertIn(full_msg, caught.exception.__notes__[0])
3177 caught.exception.__notes__.clear()
3178
3179 def raise_obj(self, *args, **kwds):
3180 # Helper to dynamically change the object raised by a test codec

Callers 1

check_noteMethod · 0.95

Calls 4

assertInMethod · 0.80
formatMethod · 0.45
assertRaisesMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected