(self)
| 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()) |
nothing calls this directly
no test coverage detected