From 605a4476f85f97ae274670b56d6d1d750f49cb4c Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 9 Jan 2017 07:50:19 -0800 Subject: [PATCH] Add test for ea064ff3c10f --- Lib/test/test_functools.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 9f4899ee73..eeb3a227a2 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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 -- 2.50.1