From: <fwi...@us...> - 2009-08-04 23:56:57
|
Revision: 6632 http://jython.svn.sourceforge.net/jython/?rev=6632&view=rev Author: fwierzbicki Date: 2009-08-04 23:56:50 +0000 (Tue, 04 Aug 2009) Log Message: ----------- Added test and NEWS for http://bugs.jython.org/issue1415 "ast Node creation fails with no arg constructors". Modified Paths: -------------- trunk/jython/Lib/test/test_ast_jy.py trunk/jython/NEWS Modified: trunk/jython/Lib/test/test_ast_jy.py =================================================================== --- trunk/jython/Lib/test/test_ast_jy.py 2009-08-04 23:52:49 UTC (rev 6631) +++ trunk/jython/Lib/test/test_ast_jy.py 2009-08-04 23:56:50 UTC (rev 6632) @@ -37,6 +37,115 @@ self.assert_(isinstance(z[0][0], ast.Lt)) self.assert_(isinstance(z[0][1], ast.Name)) + def test_empty_init(self): + # Jython 2.5.0 did not allow empty constructors for many ast node types + # but CPython ast nodes do allow this. For the moment, I don't see a + # reason to allow construction of the super types (like ast.AST and + # ast.stmt) as well as the op types that are implemented as enums in + # Jython (like boolop), but I've left them in but commented out for + # now. We may need them in the future since CPython allows this, but + # it may fall under implementation detail. + + #ast.AST() + ast.Add() + ast.And() + ast.Assert() + ast.Assign() + ast.Attribute() + ast.AugAssign() + ast.AugLoad() + ast.AugStore() + ast.BinOp() + ast.BitAnd() + ast.BitOr() + ast.BitXor() + ast.BoolOp() + ast.Break() + ast.Call() + ast.ClassDef() + ast.Compare() + ast.Continue() + ast.Del() + ast.Delete() + ast.Dict() + ast.Div() + ast.Ellipsis() + ast.Eq() + ast.Exec() + ast.Expr() + ast.Expression() + ast.ExtSlice() + ast.FloorDiv() + ast.For() + ast.FunctionDef() + ast.GeneratorExp() + ast.Global() + ast.Gt() + ast.GtE() + ast.If() + ast.IfExp() + ast.Import() + ast.ImportFrom() + ast.In() + ast.Index() + ast.Interactive() + ast.Invert() + ast.Is() + ast.IsNot() + ast.LShift() + ast.Lambda() + ast.List() + ast.ListComp() + ast.Load() + ast.Lt() + ast.LtE() + ast.Mod() + ast.Module() + ast.Mult() + ast.Name() + ast.Not() + ast.NotEq() + ast.NotIn() + ast.Num() + ast.Or() + ast.Param() + ast.Pass() + ast.Pow() + ast.Print() + ast.RShift() + ast.Raise() + ast.Repr() + ast.Return() + ast.Slice() + ast.Store() + ast.Str() + ast.Sub() + ast.Subscript() + ast.Suite() + ast.TryExcept() + ast.TryFinally() + ast.Tuple() + ast.UAdd() + ast.USub() + ast.UnaryOp() + ast.While() + ast.With() + ast.Yield() + ast.alias() + ast.arguments() + #ast.boolop() + #ast.cmpop() + ast.comprehension() + #ast.excepthandler() + #ast.expr() + #ast.expr_context() + ast.keyword() + #ast.mod() + #ast.operator() + #ast.slice() + #ast.stmt() + #ast.unaryop() + #============================================================================== def test_main(verbose=None): Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-08-04 23:52:49 UTC (rev 6631) +++ trunk/jython/NEWS 2009-08-04 23:56:50 UTC (rev 6632) @@ -8,6 +8,7 @@ the name of the produced proxy class. - Built in JSR 223 scripting engine, with LiveTribe JSR 223 implementation for JDK 5 Bugs Fixed + - [ 1415 ] ast Node creation fails with no arg constructors - [ 645615 ] cannot import through symbolic links - [ 1366 ] parsing of lamda expression fails - [ 1365 ] continuation lines fail in interactive interpreter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |