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

Method test_accepts_traceback

Lib/test/test_raise.py:230–238  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

228 self.fail("No exception raised")
229
230 def test_accepts_traceback(self):
231 tb = get_tb()
232 try:
233 raise IndexError().with_traceback(tb)
234 except IndexError as e:
235 self.assertNotEqual(e.__traceback__, tb)
236 self.assertEqual(e.__traceback__.tb_next, tb)
237 else:
238 self.fail("No exception raised")
239
240
241class TestTracebackType(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

with_tracebackMethod · 0.80
assertNotEqualMethod · 0.80
get_tbFunction · 0.70
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected