diff options
author | Raymond Hettinger <python@rcn.com> | 2014-08-12 19:44:52 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2014-08-12 19:44:52 (GMT) |
commit | 4d58897fdb0f123340246fac79174a52d7cbcf85 (patch) | |
tree | 312b779808cbfe4b8ce9d9a9e142e0ccb778cca5 /Lib/test/test_functools.py | |
parent | 4d83192ea05f5c14534edbff2b3a74bb19f01068 (diff) | |
download | cpython-4d58897fdb0f123340246fac79174a52d7cbcf85.zip cpython-4d58897fdb0f123340246fac79174a52d7cbcf85.tar.gz cpython-4d58897fdb0f123340246fac79174a52d7cbcf85.tar.bz2 |
Issue 22184: Early detection and reporting of missing lru_cache parameters
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): |