summaryrefslogtreecommitdiff
path: root/tests/basics/iter1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/iter1.py')
-rw-r--r--tests/basics/iter1.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/iter1.py b/tests/basics/iter1.py
index 5bd7f5090..9117dfd2b 100644
--- a/tests/basics/iter1.py
+++ b/tests/basics/iter1.py
@@ -9,6 +9,15 @@ try:
except TypeError:
print('TypeError')
+# this class has no __next__ implementation
+class NotIterable:
+ def __iter__(self):
+ return self
+try:
+ print(all(NotIterable()))
+except TypeError:
+ print('TypeError')
+
class MyStopIteration(StopIteration):
pass