[Python-checkins] CVS: python/dist/src/Lib/test test_grammar.py,1.23,1.24

Jeremy Hylton jhylton@users.sourceforge.net
Mon, 22 Jan 2001 17:51:42 -0800


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

Modified Files:
	test_grammar.py 
Log Message:
Add simple test of list comprehension that uses a name that isn't
otherwise used in the same code block.  (Not sure this is the right
place, but there is no test_list_comprehensions.py.)


Index: test_grammar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** test_grammar.py	2001/01/19 03:26:33	1.23
--- test_grammar.py	2001/01/23 01:51:40	1.24
***************
*** 613,616 ****
--- 613,622 ----
  print [(i, s) for i in nums for s in strs]
  print [(i, s) for i in nums for s in [f for f in strs if "n" in f]]
+ 
+ def test_in_func(l):
+     return [None < x < 3 for x in l if x > 2]
+ 
+ print test_in_func(nums)
+ 
  try:
      eval("[i, s for i in nums for s in strs]")