summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/basics/fun_calldblstar3.py3
-rw-r--r--tests/basics/fun_callstar.py5
-rw-r--r--tests/basics/iter0.py3
3 files changed, 10 insertions, 1 deletions
diff --git a/tests/basics/fun_calldblstar3.py b/tests/basics/fun_calldblstar3.py
index 4367e68df7..b796d52c7e 100644
--- a/tests/basics/fun_calldblstar3.py
+++ b/tests/basics/fun_calldblstar3.py
@@ -5,7 +5,8 @@ def foo(**kw):
class Mapping:
def keys(self):
- return ['a', 'b', 'c']
+ # the long string checks the case of string interning
+ return ['a', 'b', 'c', 'abcdefghijklmnopqrst']
def __getitem__(self, key):
if key == 'a':
diff --git a/tests/basics/fun_callstar.py b/tests/basics/fun_callstar.py
index 2275d3d4fc..a27a288a3c 100644
--- a/tests/basics/fun_callstar.py
+++ b/tests/basics/fun_callstar.py
@@ -17,6 +17,11 @@ foo(*range(3))
# pos then iterator
foo(1, *range(2, 4))
+# an iterator with many elements
+def foo(*rest):
+ print(rest)
+foo(*range(10))
+
# method calls with *pos
class A:
diff --git a/tests/basics/iter0.py b/tests/basics/iter0.py
index 6110e8fa58..d20ade7fee 100644
--- a/tests/basics/iter0.py
+++ b/tests/basics/iter0.py
@@ -4,3 +4,6 @@ try:
pass
except TypeError:
print('TypeError')
+
+# builtin type that is iterable, calling __next__ explicitly
+print(iter(range(4)).__next__())