Add test for ea064ff3c10f

This commit is contained in:
Raymond Hettinger 2017-01-09 07:50:19 -08:00
parent 68191f8a9c
commit 605a4476f8
1 changed files with 9 additions and 0 deletions

View File

@ -1238,6 +1238,15 @@ class TestLRU:
finally:
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):
# Regression test for issue #28653.
# lru_cache was leaking when one of the arguments