[Stackless-checkins] CVS: slpdev/src/2.3/dev/Lib/test test_generators.py, 1.4, 1.5

Christian Tismer tismer at centera.de
Sun Apr 25 01:29:43 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Lib/test
In directory centera.de:/tmp/cvs-serv10482/Lib/test

Modified Files:
	test_generators.py 
Log Message:
I did a big cleanup. Tried to reformat everything using 8-tabs,
roemoved dead code, and tried to make all Python source
file whitespace compatible with the Stackless' version.

I hope I didn't make too many mistakes...

Index: test_generators.py
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Lib/test/test_generators.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_generators.py	14 Mar 2004 14:38:03 -0000	1.4
--- test_generators.py	24 Apr 2004 23:29:40 -0000	1.5
***************
*** 377,387 ****
  ...     yield 1
  ...
! >>> import types
! >>> isinstance(g, types.FunctionType)
! True
  >>> i = g()
! >>> import types
! >>> isinstance(i,types.GeneratorType)
! True
  >>> [s for s in dir(i) if not s.startswith('_')]
  ['gi_frame', 'gi_running', 'next']
--- 377,385 ----
  ...     yield 1
  ...
! >>> type(g)
! <type 'function'>
  >>> i = g()
! >>> type(i)
! <type 'generator'>
  >>> [s for s in dir(i) if not s.startswith('_')]
  ['gi_frame', 'gi_running', 'next']
***************
*** 390,393 ****
--- 388,392 ----
  >>> iter(i) is i
  True
+ >>> import types
  >>> isinstance(i, types.GeneratorType)
  True
***************
*** 397,402 ****
  >>> i.gi_running
  0
! >>> type(i.gi_frame).__name__
! 'frame'
  >>> i.gi_running = 42
  Traceback (most recent call last):
--- 396,401 ----
  >>> i.gi_running
  0
! >>> type(i.gi_frame)
! <type 'frame'>
  >>> i.gi_running = 42
  Traceback (most recent call last):
***************
*** 736,749 ****
  ...     if 0:
  ...         yield 1
! >>> import types
! >>> isinstance(f(),types.GeneratorType)
! True
  
  >>> def f():
  ...    if "":
  ...        yield None
! >>> import types
! >>> isinstance(f(),types.GeneratorType)
! True
  
  >>> def f():
--- 735,746 ----
  ...     if 0:
  ...         yield 1
! >>> type(f())
! <type 'generator'>
  
  >>> def f():
  ...    if "":
  ...        yield None
! >>> type(f())
! <type 'generator'>
  
  >>> def f():
***************
*** 768,774 ****
  ...         x = 1
  ...     return
! >>> import types
! >>> isinstance(f(),types.GeneratorType)
! True
  
  >>> def f():
--- 765,770 ----
  ...         x = 1
  ...     return
! >>> type(f())
! <type 'generator'>
  
  >>> def f():
***************
*** 795,801 ****
  ...     if 0:
  ...         yield 2
! >>> import types
! >>> isinstance(f(),types.GeneratorType)
! True
  
  
--- 791,796 ----
  ...     if 0:
  ...         yield 2
! >>> type(f())
! <type 'generator'>
  
  


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list