From: <fwi...@us...> - 2009-07-30 15:11:10
|
Revision: 6609 http://jython.svn.sourceforge.net/jython/?rev=6609&view=rev Author: fwierzbicki Date: 2009-07-30 15:11:03 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Excercise all of the partial valid sentences that I can think of to avoid screwing up things like "try:" in the future. Modified Paths: -------------- trunk/jython/Lib/test/test_codeop.py Modified: trunk/jython/Lib/test/test_codeop.py =================================================================== --- trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:46:38 UTC (rev 6608) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-30 15:11:03 UTC (rev 6609) @@ -161,6 +161,18 @@ # http://bugs.jython.org/issue1354 ai("if True:\n if True:\n if True: \n") + ai("@a(") + ai("@a(b") + ai("@a(b,") + ai("@a(b,c") + ai("@a(b,c,") + + ai("from a import (") + ai("from a import (b") + ai("from a import (b,") + ai("from a import (b,c") + ai("from a import (b,c,") + ai("["); ai("[a"); ai("[a,"); @@ -183,6 +195,14 @@ ai("a(b,c") ai("a(b,c,") + ai("a[") + ai("a[b") + ai("a[b,") + ai("a[b:") + ai("a[b:c") + ai("a[b:c:") + ai("a[b:c:d") + ai("def a(") ai("def a(b") ai("def a(b,") @@ -195,11 +215,37 @@ ai("(a,b") ai("(a,b,") + ai("if a:\n pass\nelif b:") + ai("if a:\n pass\nelif b:\n pass\nelse:") + + ai("while a:") + ai("while a:\n pass\nelse:") + + ai("for a in b:") + ai("for a in b:\n pass\nelse:") + ai("try:") ai("try:\n pass\nexcept:") ai("try:\n pass\nfinally:") ai("try:\n pass\nexcept:\n pass\nfinally:") + ai("with a:") + ai("with a as b:") + + ai("class a:") + ai("class a(") + ai("class a(b") + ai("class a(b,") + ai("class a():") + + ai("[x for") + ai("[x for x in") + ai("[x for x in (") + + ai("(x for") + ai("(x for x in") + ai("(x for x in (") + def test_invalid(self): ai = self.assertInvalid ai("a b") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |