From: <cg...@us...> - 2009-01-24 20:11:04
|
Revision: 5971 http://jython.svn.sourceforge.net/jython/?rev=5971&view=rev Author: cgroves Date: 2009-01-24 20:10:59 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Run the java import * test from a sub-interpreter to allow regrtest to be run with python.cachedir.skip=true Modified Paths: -------------- trunk/jython/Lib/test/test_java_integration.py Added Paths: ----------- trunk/jython/Lib/test/import_star_from_java.py Added: trunk/jython/Lib/test/import_star_from_java.py =================================================================== --- trunk/jython/Lib/test/import_star_from_java.py (rev 0) +++ trunk/jython/Lib/test/import_star_from_java.py 2009-01-24 20:10:59 UTC (rev 5971) @@ -0,0 +1,4 @@ +from java.util.regex import * + +p = Pattern.compile("foo") +assert p.flags() == 0 Modified: trunk/jython/Lib/test/test_java_integration.py =================================================================== --- trunk/jython/Lib/test/test_java_integration.py 2009-01-24 18:02:37 UTC (rev 5970) +++ trunk/jython/Lib/test/test_java_integration.py 2009-01-24 20:10:59 UTC (rev 5971) @@ -21,10 +21,6 @@ from org.python.core.util import FileUtil from org.python.tests import BeanImplementation, Child, Listenable, CustomizableMapHolder -#Just for test_import_star -#java.util.regex was chosen for its small number of classes to reduce the pollution. -from java.util.regex import * - class InstantiationTest(unittest.TestCase): def test_cant_instantiate_abstract(self): self.assertRaises(TypeError, Component) @@ -417,9 +413,8 @@ self.assertEquals(None, m.nonexistent, "Nonexistent fields should be passed on to the Map") def test_import_star(self): - #Depends on "from java.util.regex import *" at the top. - x = Pattern.compile("foo") - self.assertEquals(x.flags(), 0) + self.assertEquals(subprocess.call([sys.executable, + test_support.findfile("import_star_from_java.py")]), 0) def test_main(): test_support.run_unittest(InstantiationTest, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |