MCPcopy Create free account
hub / github.com/python/cpython / test_dis_with_no_positions

Method test_dis_with_no_positions

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

Source from the content-addressed store, hash-verified

1121 self.do_disassembly_test(f, expect, show_positions=True)
1122
1123 def test_dis_with_no_positions(self):
1124 def f():
1125 pass
1126
1127 f.__code__ = f.__code__.replace(co_linetable=b'')
1128 expect = '\n'.join([
1129 ' RESUME 0',
1130 ' LOAD_CONST 0 (None)',
1131 ' RETURN_VALUE',
1132 '',
1133 ])
1134 self.do_disassembly_test(f, expect, show_positions=True)
1135
1136 def test_bug_708901(self):
1137 self.do_disassembly_test(bug708901, dis_bug708901)

Callers

nothing calls this directly

Calls 3

do_disassembly_testMethod · 0.95
replaceMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected