From: <cg...@us...> - 2009-01-11 01:12:23
|
Revision: 5914 http://jython.svn.sourceforge.net/jython/?rev=5914&view=rev Author: cgroves Date: 2009-01-11 01:12:16 +0000 (Sun, 11 Jan 2009) Log Message: ----------- Creating the empty.py file after the bytecode just meant that it had a more recent modtime and would be preferred for importing, so it wasn't testing anything. Modified Paths: -------------- trunk/jython/Lib/test/test_import_jy.py Modified: trunk/jython/Lib/test/test_import_jy.py =================================================================== --- trunk/jython/Lib/test/test_import_jy.py 2009-01-11 01:03:33 UTC (rev 5913) +++ trunk/jython/Lib/test/test_import_jy.py 2009-01-11 01:12:16 UTC (rev 5914) @@ -89,13 +89,11 @@ # Again ensure we didn't recompile self.assertEquals(bytecode, read(init_compiled), 'bytecode was recompiled') + def test_corrupt_bytecode(self): f = open("empty$py.class", "w") f.close() self.assertRaises(ImportError, __import__, "empty") - f = open("empty.py", "w") - f.close() - self.assertRaises(ImportError, __import__, "empty") class OverrideBuiltinsImportTestCase(unittest.TestCase): def test_override(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |