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

Method test_basic_loop

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

Source from the content-addressed store, hash-verified

187 self.guard_is_false, self.guard_is_true = get_bool_guard_ops()
188
189 def test_basic_loop(self):
190 def testfunc(x):
191 i = 0
192 while i < x:
193 i += 1
194
195 testfunc(TIER2_THRESHOLD)
196
197 ex = get_first_executor(testfunc)
198 self.assertIsNotNone(ex)
199 uops = get_opnames(ex)
200 self.assertIn("_JUMP_TO_TOP", uops)
201 self.assertIn("_LOAD_FAST_BORROW_0", uops)
202
203 def test_extended_arg(self):
204 "Check EXTENDED_ARG handling in superblock creation"

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