From: <fwi...@us...> - 2009-06-03 23:55:13
|
Revision: 6441 http://jython.svn.sourceforge.net/jython/?rev=6441&view=rev Author: fwierzbicki Date: 2009-06-03 23:55:10 +0000 (Wed, 03 Jun 2009) Log Message: ----------- Forgot to add a test for http://bugs.jython.org/issue1354 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-06-03 07:53:04 UTC (rev 6440) +++ trunk/jython/Lib/test/test_codeop.py 2009-06-03 23:55:10 UTC (rev 6441) @@ -149,6 +149,10 @@ ai("9+ \\","eval") #ai("lambda z: \\","eval") + #Did not work in Jython 2.5rc2 see first issue in + # http://bugs.jython.org/issue1354 + ai("if True:\n if True:\n if True: \n") + 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. |
From: <fwi...@us...> - 2009-07-28 13:29:19
|
Revision: 6595 http://jython.svn.sourceforge.net/jython/?rev=6595&view=rev Author: fwierzbicki Date: 2009-07-28 13:29:09 +0000 (Tue, 28 Jul 2009) Log Message: ----------- Only one test still failing for us - will require a large change in PythonPartial.g to fix. 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-27 20:39:10 UTC (rev 6594) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-28 13:29:09 UTC (rev 6595) @@ -173,7 +173,10 @@ ai("a = 'a\\\n") ai("a = 1","eval") - #ai("a = (","eval") + #XXX: Current limitation in PythonPartial.g prevents this from properly + # erroring on Jython. + if not is_jython: + ai("a = (","eval") ai("]","eval") ai("())","eval") ai("[}","eval") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-07-30 14:36:26
|
Revision: 6606 http://jython.svn.sourceforge.net/jython/?rev=6606&view=rev Author: fwierzbicki Date: 2009-07-30 14:36:21 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Beefing up tests for partial sentences in interactive mode. 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:31:06 UTC (rev 6605) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:36:21 UTC (rev 6606) @@ -161,6 +161,40 @@ # http://bugs.jython.org/issue1354 ai("if True:\n if True:\n if True: \n") + ai("["); + ai("[a"); + ai("[a,"); + ai("[a,b"); + ai("[a,b,"); + + ai("{"); + ai("{a"); + ai("{a:"); + ai("{a:b"); + ai("{a:b,"); + ai("{a:b,c"); + ai("{a:b,c:"); + ai("{a:b,c:d"); + ai("{a:b,c:d,"); + + ai("a(") + ai("a(b") + ai("a(b,") + ai("a(b,c") + ai("a(b,c,") + + ai("def a(") + ai("def a(b") + ai("def a(b,") + ai("def a(b,c") + ai("def a(b,c,") + + ai("(") + ai("(a") + ai("(a,") + ai("(a,b") + ai("(a,b,") + 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. |
From: <fwi...@us...> - 2009-07-30 14:46:49
|
Revision: 6608 http://jython.svn.sourceforge.net/jython/?rev=6608&view=rev Author: fwierzbicki Date: 2009-07-30 14:46:38 +0000 (Thu, 30 Jul 2009) Log Message: ----------- As CPython trunk: assert_ -> assertTrue 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:42:55 UTC (rev 6607) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:46:38 UTC (rev 6608) @@ -23,7 +23,7 @@ '''succeed iff str is a valid piece of code''' if is_jython: code = compile_command(str, "<input>", symbol) - self.assert_(code) + self.assertTrue(code) if symbol == "single": d,r = {},{} saved_stdout = sys.stdout @@ -52,9 +52,9 @@ compile_command(str,symbol=symbol) self.fail("No exception thrown for invalid code") except SyntaxError: - self.assert_(is_syntax) + self.assertTrue(is_syntax) except OverflowError: - self.assert_(not is_syntax) + self.assertTrue(not is_syntax) def test_valid(self): av = self.assertValid This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |