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

Method do_disassembly_test

Lib/test/test_dis.py:1015–1024  ·  view source on GitHub ↗
(self, func, expected, **kwargs)

Source from the content-addressed store, hash-verified

1013 return self.get_disassembly(func, lasti, False)
1014
1015 def do_disassembly_test(self, func, expected, **kwargs):
1016 self.maxDiff = None
1017 got = self.get_disassembly(func, depth=0, **kwargs)
1018 self.do_disassembly_compare(got, expected)
1019 # Add checks for dis.disco
1020 if hasattr(func, '__code__'):
1021 got_disco = io.StringIO()
1022 with contextlib.redirect_stdout(got_disco):
1023 dis.disco(func.__code__, **kwargs)
1024 self.do_disassembly_compare(got_disco.getvalue(), expected)
1025
1026 def test_opmap(self):
1027 self.assertEqual(dis.opmap["CACHE"], 0)

Callers 15

test_disMethod · 0.95
test_dis_with_offsetsMethod · 0.95
test_bug_708901Method · 0.95
test_bug_1333982Method · 0.95
test_bug_42562Method · 0.95
test_bug_45757Method · 0.95
test_bug_46724Method · 0.95
test_kw_namesMethod · 0.95

Calls 3

get_disassemblyMethod · 0.95
getvalueMethod · 0.95

Tested by

no test coverage detected