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

Method test_instance_attribute

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

Source from the content-addressed store, hash-verified

3235 self.check_note(CustomNew, "")
3236
3237 def test_instance_attribute(self):
3238 msg = "This should be noted"
3239 exc = RuntimeError(msg)
3240 exc.attr = 1
3241 self.check_note(exc, "^{}$".format(msg))
3242
3243 def test_non_str_arg(self):
3244 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