summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 992126f..e27eadd 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -917,6 +917,17 @@ StopIteration
>>> g.gi_code is f.__code__
True
+
+Test the __name__ attribute and the repr()
+
+>>> def f():
+... yield 5
+...
+>>> g = f()
+>>> g.__name__
+'f'
+>>> repr(g) # doctest: +ELLIPSIS
+'<f generator object at ...>'
"""
# conjoin is a simple backtracking generator, named in honor of Icon's