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

Method assert_specialized

Lib/test/test_opcache.py:30–33  ·  view source on GitHub ↗
(self, f, opname)

Source from the content-addressed store, hash-verified

28
29class TestBase(unittest.TestCase):
30 def assert_specialized(self, f, opname):
31 instructions = dis.get_instructions(f, adaptive=True)
32 opnames = {instruction.opname for instruction in instructions}
33 self.assertIn(opname, opnames)
34
35 def assert_no_opcode(self, f, opname):
36 instructions = dis.get_instructions(f, adaptive=True)

Calls 2

get_instructionsMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected