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

Method test_unspecialized_unpack

Lib/test/test_capi/test_opt.py:250–267  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 for opcode, oparg, _, operand in list(ex)))
249
250 def test_unspecialized_unpack(self):
251 # An example of an unspecialized opcode
252 def testfunc(x):
253 i = 0
254 while i < x:
255 i += 1
256 a, b = {1: 2, 3: 3}
257 assert a == 1 and b == 3
258 i = 0
259 while i < x:
260 i += 1
261
262 testfunc(TIER2_THRESHOLD)
263
264 ex = get_first_executor(testfunc)
265 self.assertIsNotNone(ex)
266 uops = get_opnames(ex)
267 self.assertIn("_UNPACK_SEQUENCE", uops)
268
269 def test_pop_jump_if_false(self):
270 def testfunc(n):

Callers

nothing calls this directly

Calls 5

testfuncFunction · 0.85
get_first_executorFunction · 0.85
get_opnamesFunction · 0.85
assertIsNotNoneMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected