Kaydet (Commit) 605a4476 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Add test for ea064ff3c10f

üst 68191f8a
...@@ -1238,6 +1238,15 @@ class TestLRU: ...@@ -1238,6 +1238,15 @@ class TestLRU:
finally: finally:
builtins.len = old_len builtins.len = old_len
def test_lru_star_arg_handling(self):
# Test regression that arose in ea064ff3c10f
@functools.lru_cache()
def f(*args):
return args
self.assertEqual(f(1, 2), (1, 2))
self.assertEqual(f((1, 2)), ((1, 2),))
def test_lru_type_error(self): def test_lru_type_error(self):
# Regression test for issue #28653. # Regression test for issue #28653.
# lru_cache was leaking when one of the arguments # lru_cache was leaking when one of the arguments
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment