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

Method test_dis_traceback

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

Source from the content-addressed store, hash-verified

1261 self.assertRaises(RuntimeError, dis.dis, None)
1262
1263 def test_dis_traceback(self):
1264 self.maxDiff = None
1265 try:
1266 del sys.last_traceback
1267 except AttributeError:
1268 pass
1269
1270 try:
1271 1/0
1272 except Exception as e:
1273 tb = e.__traceback__
1274 sys.last_exc = e
1275
1276 tb_dis = self.get_disassemble_as_string(tb.tb_frame.f_code, tb.tb_lasti)
1277 self.do_disassembly_test(None, tb_dis)
1278
1279 def test_dis_object(self):
1280 self.assertRaises(TypeError, dis.dis, object())

Callers

nothing calls this directly

Calls 2

do_disassembly_testMethod · 0.95

Tested by

no test coverage detected