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

Method assertNoted

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

Source from the content-addressed store, hash-verified

3180
3181 @contextlib.contextmanager
3182 def assertNoted(self, operation, exc_type, msg):
3183 full_msg = r"{} with {!r} codec failed".format(
3184 operation, self.codec_name)
3185 with self.assertRaises(exc_type) as caught:
3186 yield caught
3187 self.assertIn(full_msg, caught.exception.__notes__[0])
3188 caught.exception.__notes__.clear()
3189
3190 def raise_obj(self, *args, **kwds):
3191 # 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