From: <fwi...@us...> - 2008-10-15 20:17:01
|
Revision: 5401 http://jython.svn.sourceforge.net/jython/?rev=5401&view=rev Author: fwierzbicki Date: 2008-10-15 20:16:53 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Guard the Java-specific top imports with an is_jython. This way some of the bugtests can run in pure python to make it easier to tilt at this windmill: http://code.google.com/p/google-highly-open-participation-psf/source/browse/trunk/submissions/jython-tests-26-50.txt?r=424 Windmill summary: Turn all bugtests into real unit tests or kill. Modified Paths: -------------- trunk/jython/bugtests/support.py Modified: trunk/jython/bugtests/support.py =================================================================== --- trunk/jython/bugtests/support.py 2008-10-15 20:10:46 UTC (rev 5400) +++ trunk/jython/bugtests/support.py 2008-10-15 20:16:53 UTC (rev 5401) @@ -1,16 +1,18 @@ +import sys +is_jython = sys.platform[:4] == "java" import re, exceptions, thread, os, shutil -import jarray - import support_config as cfg -from java.io import FileInputStream -from java.io import FileOutputStream -from java.util.jar import JarEntry -from java.util.jar import JarFile -from java.util.jar import JarInputStream -from java.util.jar import JarOutputStream -from java.util.jar import Manifest +if is_jython: + import jarray + from java.io import FileInputStream + from java.io import FileOutputStream + from java.util.jar import JarEntry + from java.util.jar import JarFile + from java.util.jar import JarInputStream + from java.util.jar import JarOutputStream + from java.util.jar import Manifest UNIX = os.pathsep == ":" WIN = os.pathsep == ";" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |