From: <fwi...@us...> - 2008-10-16 20:19:58
|
Revision: 5440 http://jython.svn.sourceforge.net/jython/?rev=5440&view=rev Author: fwierzbicki Date: 2008-10-16 20:19:50 +0000 (Thu, 16 Oct 2008) Log Message: ----------- moved test131 into test_java_integration Modified Paths: -------------- trunk/jython/Lib/test/test_java_integration.py Removed Paths: ------------- trunk/jython/bugtests/test131.py Modified: trunk/jython/Lib/test/test_java_integration.py =================================================================== --- trunk/jython/Lib/test/test_java_integration.py 2008-10-16 18:58:39 UTC (rev 5439) +++ trunk/jython/Lib/test/test_java_integration.py 2008-10-16 20:19:50 UTC (rev 5440) @@ -7,8 +7,8 @@ from java.awt import (Dimension, Component, Rectangle, Button, Color, HeadlessException) from java.util import Vector, Hashtable -from java.io import (FileOutputStream, FileWriter, OutputStreamWriter, - UnsupportedEncodingException) +from java.io import FileOutputStream, FileWriter, OutputStreamWriter + from java.lang import Runnable, Thread, ThreadGroup, System, Runtime, Math, Byte from javax.swing.tree import TreePath from java.math import BigDecimal @@ -149,12 +149,22 @@ def test_io_errors(self): "Check that IOException isn't mangled into an IOError" + from java.io import UnsupportedEncodingException try: - x = OutputStreamWriter(System.out, "garbage") + x = OutputStreamWriter(System.out, "garbage") except UnsupportedEncodingException: - pass + pass else: - raise self.fail("Should have raised java.io.UnsupportedEncodingException") + self.fail("Should have raised java.io.UnsupportedEncodingException") + + def test_fileio_error(self): + from java.io import FileInputStream, IOException + try: + stream = FileInputStream("garbage") + except IOException: + pass + else: + self.fail("Should raise java.io.IOException") class VectorTest(unittest.TestCase): Deleted: trunk/jython/bugtests/test131.py =================================================================== --- trunk/jython/bugtests/test131.py 2008-10-16 18:58:39 UTC (rev 5439) +++ trunk/jython/bugtests/test131.py 2008-10-16 20:19:50 UTC (rev 5440) @@ -1,14 +0,0 @@ -""" -""" - -import java -import support - -try: - stream = java.io.FileInputStream("missing") -except java.io.IOException, ioexc: - #support.compare(ioexc.message, "cannot find") - # this message is not portable across underlying operating systems - pass -else: - raise support.TestError("Should raise a IOException") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |