[Python-checkins] cpython: Add test for ea064ff3c10f
raymond.hettinger
python-checkins at python.org
Mon Jan 9 10:50:24 EST 2017
https://hg.python.org/cpython/rev/4f4538ddb9c8
changeset: 106069:4f4538ddb9c8
user: Raymond Hettinger <python at rcn.com>
date: Mon Jan 09 07:50:19 2017 -0800
summary:
Add test for ea064ff3c10f
files:
Lib/test/test_functools.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -1238,6 +1238,15 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list