MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_setvectorcall

Method test_setvectorcall

Lib/test/test_call.py:805–814  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

803 self.assertEqual(expected, wrapped(*args, **kwargs))
804
805 def test_setvectorcall(self):
806 from _testcapi import function_setvectorcall
807 def f(num): return num + 1
808 assert_equal = self.assertEqual
809 num = 10
810 assert_equal(11, f(num))
811 function_setvectorcall(f)
812 # make sure specializer is triggered by running > 50 times
813 for _ in range(10 * ADAPTIVE_WARMUP_DELAY):
814 assert_equal("overridden", f(num))
815
816 def test_setvectorcall_load_attr_specialization_skip(self):
817 from _testcapi import function_setvectorcall

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected