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

Method testChainingAttrs

Lib/test/test_exceptions.py:703–717  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

701 self.assertEqual(e.__traceback__, None)
702
703 def testChainingAttrs(self):
704 e = Exception()
705 self.assertIsNone(e.__context__)
706 self.assertIsNone(e.__cause__)
707
708 e = TypeError()
709 self.assertIsNone(e.__context__)
710 self.assertIsNone(e.__cause__)
711
712 class MyException(OSError):
713 pass
714
715 e = MyException()
716 self.assertIsNone(e.__context__)
717 self.assertIsNone(e.__cause__)
718
719 def testChainingDescriptors(self):
720 try:

Callers

nothing calls this directly

Calls 2

assertIsNoneMethod · 0.80
MyExceptionClass · 0.70

Tested by

no test coverage detected