From: <cg...@us...> - 2008-02-17 01:10:34
|
Revision: 4137 http://jython.svn.sourceforge.net/jython/?rev=4137&view=rev Author: cgroves Date: 2008-02-16 17:10:31 -0800 (Sat, 16 Feb 2008) Log Message: ----------- Add a simple check on the output of the tests. Running test.py with no arguments runs all of the tests with output in expected_output and checks that it hasn't changed, running test.py --store <test file> updates the output for that test in expected_output, running test.py --check <test file> checks a single file and running test.py <test file> just prints its output to stdout as it always has. There are still a few tests that don't have output in expected_output as they depend on libs that aren't in Lib or CPythonLib yet. Modified Paths: -------------- trunk/sandbox/pyasm/test.py trunk/sandbox/pyasm/tests/assign.py trunk/sandbox/pyasm/tests/call.py trunk/sandbox/pyasm/tests/for_try_return.py trunk/sandbox/pyasm/tests/list_comprehension.py trunk/sandbox/pyasm/tests/loops.py trunk/sandbox/pyasm/tests/try_loops.py Added Paths: ----------- trunk/sandbox/pyasm/expected_output/ trunk/sandbox/pyasm/expected_output/assign trunk/sandbox/pyasm/expected_output/builtins trunk/sandbox/pyasm/expected_output/call trunk/sandbox/pyasm/expected_output/call_return trunk/sandbox/pyasm/expected_output/class_simple trunk/sandbox/pyasm/expected_output/constants trunk/sandbox/pyasm/expected_output/exception trunk/sandbox/pyasm/expected_output/for trunk/sandbox/pyasm/expected_output/for_try_return trunk/sandbox/pyasm/expected_output/generator trunk/sandbox/pyasm/expected_output/generator_close trunk/sandbox/pyasm/expected_output/generator_comprehension trunk/sandbox/pyasm/expected_output/generator_finally trunk/sandbox/pyasm/expected_output/generator_state trunk/sandbox/pyasm/expected_output/generator_state2 trunk/sandbox/pyasm/expected_output/global trunk/sandbox/pyasm/expected_output/import trunk/sandbox/pyasm/expected_output/lexical_binding trunk/sandbox/pyasm/expected_output/list trunk/sandbox/pyasm/expected_output/list_comprehension trunk/sandbox/pyasm/expected_output/loops trunk/sandbox/pyasm/expected_output/print trunk/sandbox/pyasm/expected_output/print_chevron trunk/sandbox/pyasm/expected_output/relalg trunk/sandbox/pyasm/expected_output/simple_decorator trunk/sandbox/pyasm/expected_output/simple_decorator_scopes trunk/sandbox/pyasm/expected_output/simple_decorator_scopes1 trunk/sandbox/pyasm/expected_output/simple_decorator_scopes2 trunk/sandbox/pyasm/expected_output/simple_func trunk/sandbox/pyasm/expected_output/strings trunk/sandbox/pyasm/expected_output/try trunk/sandbox/pyasm/expected_output/try_except trunk/sandbox/pyasm/expected_output/try_finally trunk/sandbox/pyasm/expected_output/try_finally_function trunk/sandbox/pyasm/expected_output/try_loops trunk/sandbox/pyasm/expected_output/try_nested trunk/sandbox/pyasm/expected_output/unpack trunk/sandbox/pyasm/expected_output/varargs trunk/sandbox/pyasm/expected_output/while Added: trunk/sandbox/pyasm/expected_output/assign =================================================================== --- trunk/sandbox/pyasm/expected_output/assign (rev 0) +++ trunk/sandbox/pyasm/expected_output/assign 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,3 @@ +6 +5 +2 Added: trunk/sandbox/pyasm/expected_output/builtins =================================================================== --- trunk/sandbox/pyasm/expected_output/builtins (rev 0) +++ trunk/sandbox/pyasm/expected_output/builtins 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,139 @@ +exceptions.ArithmeticError +exceptions.AssertionError +exceptions.AttributeError +exceptions.DeprecationWarning +exceptions.EOFError +Ellipsis +exceptions.EnvironmentError +exceptions.Exception +False +exceptions.FloatingPointError +exceptions.FutureWarning +exceptions.GeneratorExit +exceptions.IOError +exceptions.ImportError +exceptions.IndentationError +exceptions.IndexError +exceptions.KeyError +exceptions.KeyboardInterrupt +exceptions.LookupError +exceptions.MemoryError +exceptions.NameError +None +NotImplemented +exceptions.NotImplementedError +exceptions.OSError +exceptions.OverflowError +exceptions.PendingDeprecationWarning +exceptions.ReferenceError +exceptions.RuntimeError +exceptions.RuntimeWarning +exceptions.StandardError +exceptions.StopIteration +exceptions.SyntaxError +exceptions.SyntaxWarning +exceptions.SystemError +exceptions.SystemExit +exceptions.TabError +True +exceptions.TypeError +exceptions.UnboundLocalError +exceptions.UnicodeDecodeError +exceptions.UnicodeEncodeError +exceptions.UnicodeError +exceptions.UnicodeTranslateError +exceptions.UserWarning +exceptions.ValueError +exceptions.Warning +exceptions.ZeroDivisionError +1 +None +<built-in function __import__> +__main__ +<built-in function abs> +<built-in function apply> +<type 'basestring'> +<type 'bool'> +<built-in function callable> +<built-in function chr> +<type 'classmethod'> +<built-in function cmp> +<built-in function coerce> +<built-in function compile> +<type 'complex'> +Copyright (c) 2000-2007, Jython Developers +All rights reserved. + +Copyright (c) 2000 BeOpen.com. +All Rights Reserved. + +Copyright (c) 2000 The Apache Software Foundation. All rights +reserved. + +Copyright (c) 1995-2000 Corporation for National Research Initiatives. +All Rights Reserved. + +Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. +All Rights Reserved. + + +Jython is maintained by the Jython developers (www.jython.org). +<built-in function delattr> +<type 'dict'> +<built-in function dir> +<built-in function divmod> +<type 'enumerate'> +<built-in function eval> +<built-in function execfile> +Use Ctrl-D (i.e. EOF) to exit. +<type 'file'> +<built-in function filter> +<type 'float'> +<type 'ImmutableSet'> +<built-in function getattr> +<built-in function globals> +<built-in function hasattr> +<built-in function hash> +<built-in function hex> +<built-in function id> +<built-in function input> +<type 'int'> +<built-in function intern> +<built-in function isinstance> +<built-in function issubclass> +<built-in function iter> +<built-in function len> +See http://www.pythonlabs.com/products/python2.0/license.html +<type 'list'> +<built-in function locals> +<type 'long'> +<built-in function map> +<built-in function max> +<built-in function min> +<type 'object'> +<built-in function oct> +<type 'file'> +<built-in function ord> +<built-in function pow> +<type 'property'> +Use Ctrl-D (i.e. EOF) to exit. +<built-in function range> +<built-in function raw_input> +<built-in function reduce> +<built-in function reload> +<built-in function repr> +<built-in function round> +<type 'Set'> +<built-in function setattr> +<type 'slice'> +<type 'staticmethod'> +<type 'str'> +<built-in function sum> +<type 'super'> +<type 'tuple'> +<type 'type'> +<built-in function unichr> +<type 'unicode'> +<built-in function vars> +<built-in function xrange> +<built-in function zip> Added: trunk/sandbox/pyasm/expected_output/call =================================================================== --- trunk/sandbox/pyasm/expected_output/call (rev 0) +++ trunk/sandbox/pyasm/expected_output/call 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,7 @@ +1 2 +1 2 +1 2 +1 2 +2 1 +1 2 +1 2 Added: trunk/sandbox/pyasm/expected_output/call_return =================================================================== --- trunk/sandbox/pyasm/expected_output/call_return (rev 0) +++ trunk/sandbox/pyasm/expected_output/call_return 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +2 Added: trunk/sandbox/pyasm/expected_output/class_simple =================================================================== --- trunk/sandbox/pyasm/expected_output/class_simple (rev 0) +++ trunk/sandbox/pyasm/expected_output/class_simple 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +Test('hej') Added: trunk/sandbox/pyasm/expected_output/constants =================================================================== --- trunk/sandbox/pyasm/expected_output/constants (rev 0) +++ trunk/sandbox/pyasm/expected_output/constants 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,9 @@ +1 +2 +True +None + +hej +() +(1, 2) +3.14 Added: trunk/sandbox/pyasm/expected_output/exception =================================================================== --- trunk/sandbox/pyasm/expected_output/exception (rev 0) +++ trunk/sandbox/pyasm/expected_output/exception 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,2 @@ +exceptions.TypeError +probe Added: trunk/sandbox/pyasm/expected_output/for =================================================================== --- trunk/sandbox/pyasm/expected_output/for (rev 0) +++ trunk/sandbox/pyasm/expected_output/for 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,6 @@ +0 +1 +2 +3 +5 +6 Added: trunk/sandbox/pyasm/expected_output/for_try_return =================================================================== --- trunk/sandbox/pyasm/expected_output/for_try_return (rev 0) +++ trunk/sandbox/pyasm/expected_output/for_try_return 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +_ Added: trunk/sandbox/pyasm/expected_output/generator =================================================================== --- trunk/sandbox/pyasm/expected_output/generator (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,19 @@ +3 +None +2 +None +1 +None +0 +None +1 +hi +0 +Caught exception: ok +ok +2 +hi +1 +Caught exception: ok +Caught StopIteration: ok +1 Added: trunk/sandbox/pyasm/expected_output/generator_close =================================================================== --- trunk/sandbox/pyasm/expected_output/generator_close (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator_close 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +Caught Added: trunk/sandbox/pyasm/expected_output/generator_comprehension =================================================================== --- trunk/sandbox/pyasm/expected_output/generator_comprehension (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator_comprehension 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,10 @@ +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 Added: trunk/sandbox/pyasm/expected_output/generator_finally =================================================================== --- trunk/sandbox/pyasm/expected_output/generator_finally (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator_finally 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,9 @@ +g.next(): 0 +g.send(14): 14 +1 +g.throw(...): EXCEPTION: FEL +2 +g.next(): None +3 +g.close(): done +None Added: trunk/sandbox/pyasm/expected_output/generator_state =================================================================== --- trunk/sandbox/pyasm/expected_output/generator_state (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator_state 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,8 @@ +res: 0 +one +res: 1 +one +res: 2 +one +res: 3 +one Added: trunk/sandbox/pyasm/expected_output/generator_state2 =================================================================== --- trunk/sandbox/pyasm/expected_output/generator_state2 (rev 0) +++ trunk/sandbox/pyasm/expected_output/generator_state2 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,3 @@ +0 +err: probe +1 Added: trunk/sandbox/pyasm/expected_output/global =================================================================== --- trunk/sandbox/pyasm/expected_output/global (rev 0) +++ trunk/sandbox/pyasm/expected_output/global 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,2 @@ +5 +7 Added: trunk/sandbox/pyasm/expected_output/import =================================================================== --- trunk/sandbox/pyasm/expected_output/import (rev 0) +++ trunk/sandbox/pyasm/expected_output/import 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,3 @@ +sys module +<module 'marshal' from '/Users/groves/dev/jython/pyasm/marshal.py'> +<java package java.lang 2> Added: trunk/sandbox/pyasm/expected_output/lexical_binding =================================================================== --- trunk/sandbox/pyasm/expected_output/lexical_binding (rev 0) +++ trunk/sandbox/pyasm/expected_output/lexical_binding 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,4 @@ +3 +4 +3 +5 Added: trunk/sandbox/pyasm/expected_output/list =================================================================== --- trunk/sandbox/pyasm/expected_output/list (rev 0) +++ trunk/sandbox/pyasm/expected_output/list 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +[1, 2, 3, 4, 5, 6, 7] Added: trunk/sandbox/pyasm/expected_output/list_comprehension =================================================================== --- trunk/sandbox/pyasm/expected_output/list_comprehension (rev 0) +++ trunk/sandbox/pyasm/expected_output/list_comprehension 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Added: trunk/sandbox/pyasm/expected_output/loops =================================================================== --- trunk/sandbox/pyasm/expected_output/loops (rev 0) +++ trunk/sandbox/pyasm/expected_output/loops 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +4 Added: trunk/sandbox/pyasm/expected_output/print =================================================================== --- trunk/sandbox/pyasm/expected_output/print (rev 0) +++ trunk/sandbox/pyasm/expected_output/print 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +hello world Added: trunk/sandbox/pyasm/expected_output/print_chevron =================================================================== --- trunk/sandbox/pyasm/expected_output/print_chevron (rev 0) +++ trunk/sandbox/pyasm/expected_output/print_chevron 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +hello world Added: trunk/sandbox/pyasm/expected_output/relalg =================================================================== --- trunk/sandbox/pyasm/expected_output/relalg (rev 0) +++ trunk/sandbox/pyasm/expected_output/relalg 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,4 @@ +NJ Set([('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 25), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 40), ('saver', 'Thrifty', 'Saver', '234-567-8901', 'saver', 'deposited', 30), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'deposited', 100), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 15)]) +HJ Set([('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 25), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 40), ('saver', 'Thrifty', 'Saver', '234-567-8901', 'saver', 'deposited', 30), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'deposited', 100), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 15)]) +BJ Set([('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 25), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 40), ('saver', 'Thrifty', 'Saver', '234-567-8901', 'saver', 'deposited', 30), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'deposited', 100), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 15)]) +MJ Set([('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 25), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 40), ('saver', 'Thrifty', 'Saver', '234-567-8901', 'saver', 'deposited', 30), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'deposited', 100), ('spender', 'Big', 'Spender', '123-456-7890', 'spender', 'withdraw', 15)]) Added: trunk/sandbox/pyasm/expected_output/simple_decorator =================================================================== --- trunk/sandbox/pyasm/expected_output/simple_decorator (rev 0) +++ trunk/sandbox/pyasm/expected_output/simple_decorator 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +2 Added: trunk/sandbox/pyasm/expected_output/simple_decorator_scopes =================================================================== --- trunk/sandbox/pyasm/expected_output/simple_decorator_scopes (rev 0) +++ trunk/sandbox/pyasm/expected_output/simple_decorator_scopes 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +1 Added: trunk/sandbox/pyasm/expected_output/simple_decorator_scopes1 =================================================================== --- trunk/sandbox/pyasm/expected_output/simple_decorator_scopes1 (rev 0) +++ trunk/sandbox/pyasm/expected_output/simple_decorator_scopes1 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +2 Added: trunk/sandbox/pyasm/expected_output/simple_decorator_scopes2 =================================================================== --- trunk/sandbox/pyasm/expected_output/simple_decorator_scopes2 (rev 0) +++ trunk/sandbox/pyasm/expected_output/simple_decorator_scopes2 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,2 @@ +a(1, 2) +2 Added: trunk/sandbox/pyasm/expected_output/simple_func =================================================================== Added: trunk/sandbox/pyasm/expected_output/strings =================================================================== --- trunk/sandbox/pyasm/expected_output/strings (rev 0) +++ trunk/sandbox/pyasm/expected_output/strings 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,3 @@ +hello world +hello world +hello world Added: trunk/sandbox/pyasm/expected_output/try =================================================================== --- trunk/sandbox/pyasm/expected_output/try (rev 0) +++ trunk/sandbox/pyasm/expected_output/try 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,6 @@ +else-block +done +pass: 1 +except-block +done +fail: integer division or modulo by zero Added: trunk/sandbox/pyasm/expected_output/try_except =================================================================== --- trunk/sandbox/pyasm/expected_output/try_except (rev 0) +++ trunk/sandbox/pyasm/expected_output/try_except 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,2 @@ +pass: 1 +fail: integer division or modulo by zero Added: trunk/sandbox/pyasm/expected_output/try_finally =================================================================== --- trunk/sandbox/pyasm/expected_output/try_finally (rev 0) +++ trunk/sandbox/pyasm/expected_output/try_finally 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,3 @@ +done +exceptions.NameError +error Added: trunk/sandbox/pyasm/expected_output/try_finally_function =================================================================== --- trunk/sandbox/pyasm/expected_output/try_finally_function (rev 0) +++ trunk/sandbox/pyasm/expected_output/try_finally_function 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,11 @@ +done +zero +done +one +done +dunno +done +dunno +done +exceptions.TypeError +works Added: trunk/sandbox/pyasm/expected_output/try_loops =================================================================== --- trunk/sandbox/pyasm/expected_output/try_loops (rev 0) +++ trunk/sandbox/pyasm/expected_output/try_loops 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,25 @@ +_ +_ +_ +m +a +i +n +_ +_ +_ +_ +m +a +i +n +_ +_ +_ +_ +m +a +i +n +_ +_ Added: trunk/sandbox/pyasm/expected_output/try_nested =================================================================== Added: trunk/sandbox/pyasm/expected_output/unpack =================================================================== --- trunk/sandbox/pyasm/expected_output/unpack (rev 0) +++ trunk/sandbox/pyasm/expected_output/unpack 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1,4 @@ +1 +1 +1 2 +1 2 Added: trunk/sandbox/pyasm/expected_output/varargs =================================================================== --- trunk/sandbox/pyasm/expected_output/varargs (rev 0) +++ trunk/sandbox/pyasm/expected_output/varargs 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +(1, 2, 3) Added: trunk/sandbox/pyasm/expected_output/while =================================================================== --- trunk/sandbox/pyasm/expected_output/while (rev 0) +++ trunk/sandbox/pyasm/expected_output/while 2008-02-17 01:10:31 UTC (rev 4137) @@ -0,0 +1 @@ +4 2 Modified: trunk/sandbox/pyasm/test.py =================================================================== --- trunk/sandbox/pyasm/test.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/test.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -22,11 +22,54 @@ if __name__ == '__main__': # invoked as a script import sys - filename = sys.argv[1] - file = open(filename) # open file - code = cpythonCompile(file.read(), filename) # compile file - vars = dict(__name__='__main__', __file__=filename, __doc__=None) - exec code in vars # execute compiled file + action = 'print' + if len(sys.argv) == 1: + action = 'check' + files = ['tests/%s.py' % f for f in os.listdir('expected_output')] + elif sys.argv[1] == '--store': + action = 'store' + del sys.argv[1] + elif sys.argv[1] == '--check': + action = 'check' + del sys.argv[1] + if not files: + files = sys.argv[1:] + for filename in files: + file = open(filename) # open file + code = cpythonCompile(file.read(), filename) # compile file + vars = dict(__name__='__main__', __file__=filename, __doc__=None) + import StringIO + out = StringIO.StringIO() + regularout = sys.stdout + regularerr = sys.stderr + sys.stdout = out + sys.stderr = out + try: + exec code in vars # execute compiled file + except Exception, e: + print e.__class__ + print e + sys.stdout = regularout + sys.stderr = regularerr + outfile = 'expected_output/%s' % filename.replace('.py', '').replace('tests/', '') + cur = out.getvalue() + + if action == 'print': + print cur + elif action == 'store': + store = open(outfile, 'w') + store.write(cur) + store.close() + else: + prior = open(outfile).read() + print 'Checking', filename + if not prior == cur: + print 'Expected' + print '==========' + print prior + print 'Current' + print '==========' + print cur elif __name__ == '__main__': # CPython side filename = sys.argv[1] Modified: trunk/sandbox/pyasm/tests/assign.py =================================================================== --- trunk/sandbox/pyasm/tests/assign.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/assign.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1,4 +1,7 @@ a = 5 b,c,d = 6,7,8 +print b f,g,h = a,9,b +print f i,(j,k),l = 1,(2,3),4 +print j Modified: trunk/sandbox/pyasm/tests/call.py =================================================================== --- trunk/sandbox/pyasm/tests/call.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/call.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1,5 +1,5 @@ def a(b,c): - None + print b, c a(1,c=2) a(*[1,2]) Modified: trunk/sandbox/pyasm/tests/for_try_return.py =================================================================== --- trunk/sandbox/pyasm/tests/for_try_return.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/for_try_return.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1,6 +1,7 @@ def f(): for e in __name__: try: + print e return except: pass Modified: trunk/sandbox/pyasm/tests/list_comprehension.py =================================================================== --- trunk/sandbox/pyasm/tests/list_comprehension.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/list_comprehension.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1 +1,2 @@ x = [l for l in xrange(10)] +print x Modified: trunk/sandbox/pyasm/tests/loops.py =================================================================== --- trunk/sandbox/pyasm/tests/loops.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/loops.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1,4 +1,4 @@ for e in xrange(5): while 1: break - +print e Modified: trunk/sandbox/pyasm/tests/try_loops.py =================================================================== --- trunk/sandbox/pyasm/tests/try_loops.py 2008-02-16 22:34:41 UTC (rev 4136) +++ trunk/sandbox/pyasm/tests/try_loops.py 2008-02-17 01:10:31 UTC (rev 4137) @@ -1,23 +1,27 @@ for e in __name__: try: + print e break except: pass for e in __name__: try: + print e pass except: break for e in __name__: try: + print e continue except: pass for e in __name__: try: + print e pass except: continue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |