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

Method test_dis_traceback

Lib/test/test_dis.py:1248–1262  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1246 self.assertRaises(RuntimeError, dis.dis, None)
1247
1248 def test_dis_traceback(self):
1249 self.maxDiff = None
1250 try:
1251 del sys.last_traceback
1252 except AttributeError:
1253 pass
1254
1255 try:
1256 1/0
1257 except Exception as e:
1258 tb = e.__traceback__
1259 sys.last_exc = e
1260
1261 tb_dis = self.get_disassemble_as_string(tb.tb_frame.f_code, tb.tb_lasti)
1262 self.do_disassembly_test(None, tb_dis)
1263
1264 def test_dis_object(self):
1265 self.assertRaises(TypeError, dis.dis, object())

Callers

nothing calls this directly

Calls 2

do_disassembly_testMethod · 0.95

Tested by

no test coverage detected