We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d579ea commit d84cab3Copy full SHA for d84cab3
Lib/test/test_functools.py
@@ -2158,9 +2158,11 @@ def fib(n):
2158
fib(support.exceeds_recursion_limit())
2159
2160
def test_lru_checks_arg_is_callable(self):
2161
- with self.assertRaises(TypeError) as te:
+ with self.assertRaisesRegex(
2162
+ TypeError,
2163
+ "the first argument must be callable",
2164
+ ):
2165
self.module.lru_cache(1)('hello')
- self.assertIn("the first argument must be callable", str(te.exception))
2166
2167
2168
@py_functools.lru_cache()
0 commit comments