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

Method test_instance_attribute

Lib/test/test_codecs.py:3226–3230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3224 self.check_note(CustomNew, "")
3225
3226 def test_instance_attribute(self):
3227 msg = "This should be noted"
3228 exc = RuntimeError(msg)
3229 exc.attr = 1
3230 self.check_note(exc, "^{}$".format(msg))
3231
3232 def test_non_str_arg(self):
3233 self.check_note(RuntimeError(1), "1")

Callers

nothing calls this directly

Calls 2

check_noteMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected