[Python-checkins] CVS: python/dist/src/Lib/test test_generators.py,1.25,1.26

Tim Peters tim_one@users.sourceforge.net
Tue, 14 Aug 2001 21:41:21 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv9992/python/Lib/test

Modified Files:
	test_generators.py 
Log Message:
Move one of the tests into the "PEP 255" section, to reflect a change in
the PEP.


Index: test_generators.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_generators.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** test_generators.py	2001/08/10 21:25:24	1.25
--- test_generators.py	2001/08/15 04:41:19	1.26
***************
*** 138,141 ****
--- 138,156 ----
  pep_tests = """
  
+ Specification:  Yield
+ 
+     Restriction:  A generator cannot be resumed while it is actively
+     running:
+ 
+     >>> def g():
+     ...     i = me.next()
+     ...     yield i
+     >>> me = g()
+     >>> me.next()
+     Traceback (most recent call last):
+      ...
+       File "<string>", line 2, in g
+     ValueError: generator already executing
+ 
  Specification: Return
  
***************
*** 310,325 ****
  >>> list(g())
  [1, 2, 3]
- 
- A generator can't be resumed while it's already running.
- 
- >>> def g():
- ...     i = me.next()
- ...     yield i
- >>> me = g()
- >>> me.next()
- Traceback (most recent call last):
-  ...
-   File "<string>", line 2, in g
- ValueError: generator already executing
  
  Next one was posted to c.l.py.
--- 325,328 ----