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

Method test_call_py_exact_args

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

Source from the content-addressed store, hash-verified

630 self.assertGreaterEqual(len(binop_count), 3)
631
632 def test_call_py_exact_args(self):
633 def testfunc(n):
634 def dummy(x):
635 return x+1
636 for i in range(n):
637 dummy(i)
638
639 res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
640 self.assertIsNotNone(ex)
641 uops = get_opnames(ex)
642 self.assertIn("_PUSH_FRAME", uops)
643 self.assertIn("_BINARY_OP_ADD_INT", uops)
644 self.assertNotIn("_CHECK_PEP_523", uops)
645 self.assertNotIn("_GUARD_CODE_VERSION__PUSH_FRAME", uops)
646 self.assertNotIn("_GUARD_IP__PUSH_FRAME", uops)
647
648 def test_int_type_propagate_through_range(self):
649 def testfunc(n):

Callers

nothing calls this directly

Calls 5

_run_with_optimizerMethod · 0.95
get_opnamesFunction · 0.85
assertIsNotNoneMethod · 0.80
assertInMethod · 0.80
assertNotInMethod · 0.80

Tested by

no test coverage detected