(self)
| 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 |
nothing calls this directly
no test coverage detected