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

Method test_pop_jump_if_none

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

Source from the content-addressed store, hash-verified

280 self.assertIn(self.guard_is_true, uops)
281
282 def test_pop_jump_if_none(self):
283 def testfunc(a):
284 for x in a:
285 if x is None:
286 x = 0
287
288 testfunc(range(TIER2_THRESHOLD))
289
290 ex = get_first_executor(testfunc)
291 self.assertIsNotNone(ex)
292 uops = get_opnames(ex)
293 self.assertNotIn("_GUARD_IS_NONE_POP", uops)
294 self.assertNotIn("_GUARD_IS_NOT_NONE_POP", uops)
295
296 def test_pop_jump_if_not_none(self):
297 def testfunc(a):

Callers

nothing calls this directly

Calls 5

testfuncFunction · 0.85
get_first_executorFunction · 0.85
get_opnamesFunction · 0.85
assertIsNotNoneMethod · 0.80
assertNotInMethod · 0.80

Tested by

no test coverage detected