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

Method test_show_caches_with_label

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

Source from the content-addressed store, hash-verified

2127 self.assertEqual(instruction.arg, instruction.oparg)
2128
2129 def test_show_caches_with_label(self):
2130 def f(x, y, z):
2131 if x:
2132 res = y
2133 else:
2134 res = z
2135 return res
2136
2137 output = io.StringIO()
2138 dis.dis(f.__code__, file=output, show_caches=True)
2139 self.assertIn("L1:", output.getvalue())
2140
2141 def test_is_op_format(self):
2142 output = io.StringIO()

Callers

nothing calls this directly

Calls 3

getvalueMethod · 0.95
disMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected