From: <fwi...@us...> - 2009-07-30 14:31:18
|
Revision: 6605 http://jython.svn.sourceforge.net/jython/?rev=6605&view=rev Author: fwierzbicki Date: 2009-07-30 14:31:06 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Moved a few tests from test_codeop_jy to test_codeop as they are valid for both CPython and Jython. Prepping to push these and a few more upstream to CPython. Modified Paths: -------------- trunk/jython/Lib/test/test_codeop.py trunk/jython/Lib/test/test_codeop_jy.py Modified: trunk/jython/Lib/test/test_codeop.py =================================================================== --- trunk/jython/Lib/test/test_codeop.py 2009-07-30 12:09:14 UTC (rev 6604) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:31:06 UTC (rev 6605) @@ -108,6 +108,12 @@ av("\n \na**3","eval") av("#a\n#b\na**3","eval") + # From Jython project, not Jython specific + + # this failed under Jython 2.2.1 + av("def x():\n try: pass\n finally: [a for a in (1,2)]\n") + + def test_incomplete(self): ai = self.assertIncomplete @@ -149,6 +155,8 @@ ai("9+ \\","eval") ai("lambda z: \\","eval") + # From Jython project, not Jython specific + #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") @@ -184,6 +192,10 @@ ai("lambda z:","eval") ai("a b","eval") + # From Jython project, not Jython specific + ai("return 2.3") + ai("if (a == 1 and b = 2): pass") + def test_filename(self): self.assertEquals(compile_command("a = 1\n", "abc").co_filename, compile("a = 1\n", "abc", 'single').co_filename) Modified: trunk/jython/Lib/test/test_codeop_jy.py =================================================================== --- trunk/jython/Lib/test/test_codeop_jy.py 2009-07-30 12:09:14 UTC (rev 6604) +++ trunk/jython/Lib/test/test_codeop_jy.py 2009-07-30 14:31:06 UTC (rev 6605) @@ -49,9 +49,6 @@ av("def x():\n pass\n ") av("\n\ndef x():\n pass") - # this failed under 2.2.1 - av("def x():\n try: pass\n finally: [a for a in (1,2)]\n") - av("if 9==3:\n pass\nelse:\n pass") av("if 1:\n pass\n if 1:\n pass\n else:\n pass") @@ -75,13 +72,11 @@ def test_invalid(self): ai = self.assertInvalid - ai("return 2.3") ai("del 1") ai("del ()") ai("del (1,)") ai("del [1]") ai("del '1'") - ai("if (a == 1 and b = 2): pass") ai("[i for i in range(10)] = (1, 2, 3)") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |