diff options
Diffstat (limited to 'Lib/test/test_opcache.py')
-rw-r--r-- | Lib/test/test_opcache.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Lib/test/test_opcache.py b/Lib/test/test_opcache.py index 21d7e62833c..30baa090486 100644 --- a/Lib/test/test_opcache.py +++ b/Lib/test/test_opcache.py @@ -560,6 +560,13 @@ class TestCallCache(TestBase): with self.assertRaises(TypeError): instantiate() + def test_recursion_check_for_general_calls(self): + def test(default=None): + return test() + + with self.assertRaises(RecursionError): + test() + def make_deferred_ref_count_obj(): """Create an object that uses deferred reference counting. @@ -1803,20 +1810,6 @@ class TestSpecializer(TestBase): self.assert_specialized(compare_op_str, "COMPARE_OP_STR") self.assert_no_opcode(compare_op_str, "COMPARE_OP") - @cpython_only - @requires_specialization_ft - def test_load_const(self): - def load_const(): - def unused(): pass - # Currently, the empty tuple is immortal, and the otherwise - # unused nested function's code object is mortal. This test will - # have to use different values if either of that changes. - return () - - load_const() - self.assert_specialized(load_const, "LOAD_CONST_IMMORTAL") - self.assert_specialized(load_const, "LOAD_CONST_MORTAL") - self.assert_no_opcode(load_const, "LOAD_CONST") @cpython_only @requires_specialization_ft |