diff options
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 75ae7f3..a7e5c7e 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -1070,6 +1070,13 @@ class TestLRU(unittest.TestCase): self.assertEqual(test_func(DoubleEq(2)), # Trigger a re-entrant __eq__ call DoubleEq(2)) # Verify the correct return value + def test_early_detection_of_bad_call(self): + # Issue #22184 + with self.assertRaises(TypeError): + @functools.lru_cache + def f(): + pass + class TestSingleDispatch(unittest.TestCase): def test_simple_overloads(self): |