From: <fwi...@us...> - 2009-08-10 17:58:24
|
Revision: 6652 http://jython.svn.sourceforge.net/jython/?rev=6652&view=rev Author: fwierzbicki Date: 2009-08-10 17:58:16 +0000 (Mon, 10 Aug 2009) Log Message: ----------- Reindents. Modified Paths: -------------- trunk/jython/Lib/test/anygui.py trunk/jython/Lib/test/jser2_classes.py trunk/jython/Lib/test/test_cmath_jy.py trunk/jython/Lib/test/test_codeop_jy.py trunk/jython/Lib/test/test_import_jy.py trunk/jython/Lib/test/test_java_integration.py trunk/jython/Lib/test/test_module.py trunk/jython/Lib/test/test_set_jy.py trunk/jython/Lib/test/test_xml_etree_jy.py trunk/jython/Lib/test/test_zipimport_jy.py Modified: trunk/jython/Lib/test/anygui.py =================================================================== --- trunk/jython/Lib/test/anygui.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/anygui.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -27,7 +27,7 @@ candidates = wishlist + candidates for name in candidates: - backend = self.__try_to_get('%sgui' % name) + backend = self.__try_to_get('%sgui' % name) if not backend: raise Exception, 'not able to import any GUI backends' self.__backend = backend Modified: trunk/jython/Lib/test/jser2_classes.py =================================================================== --- trunk/jython/Lib/test/jser2_classes.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/jser2_classes.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -45,4 +45,3 @@ self.__dict__ == other.__dict__) def __ne__(self, other): return not (self == other) - Modified: trunk/jython/Lib/test/test_cmath_jy.py =================================================================== --- trunk/jython/Lib/test/test_cmath_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_cmath_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -20,55 +20,55 @@ unittest.TestCase.assertAlmostEqual(self, x.imag, y.imag, places, msg) def test_acos(self): - self.assertAlmostEqual(complex(0.936812, -2.30551), + self.assertAlmostEqual(complex(0.936812, -2.30551), cmath.acos(complex(3, 4))) - + def test_acosh(self): - self.assertAlmostEqual(complex(2.30551, 0.93681), + self.assertAlmostEqual(complex(2.30551, 0.93681), cmath.acosh(complex(3, 4))) def test_asin(self): - self.assertAlmostEqual(complex(0.633984, 2.30551), + self.assertAlmostEqual(complex(0.633984, 2.30551), cmath.asin(complex(3, 4))) def test_asinh(self): - self.assertAlmostEqual(complex(2.29991, 0.917617), + self.assertAlmostEqual(complex(2.29991, 0.917617), cmath.asinh(complex(3, 4))) def test_atan(self): - self.assertAlmostEqual(complex(1.44831, 0.158997), + self.assertAlmostEqual(complex(1.44831, 0.158997), cmath.atan(complex(3, 4))) def test_atanh(self): - self.assertAlmostEqual(complex(0.11750, 1.40992), + self.assertAlmostEqual(complex(0.11750, 1.40992), cmath.atanh(complex(3, 4))) def test_cos(self): - self.assertAlmostEqual(complex(-27.03495, -3.851153), + self.assertAlmostEqual(complex(-27.03495, -3.851153), cmath.cos(complex(3, 4))) def test_cosh(self): - self.assertAlmostEqual(complex(-6.58066, -7.58155), + self.assertAlmostEqual(complex(-6.58066, -7.58155), cmath.cosh(complex(3, 4))) def test_exp(self): - self.assertAlmostEqual(complex(-13.12878, -15.20078), + self.assertAlmostEqual(complex(-13.12878, -15.20078), cmath.exp(complex(3, 4))) def test_log(self): - self.assertAlmostEqual(complex(1.60944, 0.927295), + self.assertAlmostEqual(complex(1.60944, 0.927295), cmath.log(complex(3, 4))) def test_log10(self): - self.assertAlmostEqual(complex(0.69897, 0.40272), + self.assertAlmostEqual(complex(0.69897, 0.40272), cmath.log10(complex(3, 4))) def test_sin(self): - self.assertAlmostEqual(complex(3.853738, -27.01681), + self.assertAlmostEqual(complex(3.853738, -27.01681), cmath.sin(complex(3, 4))) def test_sinh(self): - self.assertAlmostEqual(complex(-6.54812, -7.61923), + self.assertAlmostEqual(complex(-6.54812, -7.61923), cmath.sinh(complex(3, 4))) def test_sqrt_real_positive(self): @@ -78,7 +78,7 @@ def test_sqrt_real_zero(self): self.assertAlmostEqual(complex(1.41421, 1.41421), cmath.sqrt(complex(0, 4))) - + def test_sqrt_real_negative(self): self.assertAlmostEqual(complex(1, 2), cmath.sqrt(complex(-3, 4))) @@ -92,11 +92,11 @@ cmath.sqrt(complex(-3, -4))) def test_tan(self): - self.assertAlmostEqual(complex(-0.000187346, 0.999356), + self.assertAlmostEqual(complex(-0.000187346, 0.999356), cmath.tan(complex(3, 4))) def test_tanh(self): - self.assertAlmostEqual(complex(1.00071, 0.00490826), + self.assertAlmostEqual(complex(1.00071, 0.00490826), cmath.tanh(complex(3, 4))) def test_main(): @@ -104,6 +104,3 @@ if __name__ == "__main__": test_main() - - - Modified: trunk/jython/Lib/test/test_codeop_jy.py =================================================================== --- trunk/jython/Lib/test/test_codeop_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_codeop_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -16,14 +16,14 @@ '''succeed iff str is a valid piece of code''' code = compile_(str, "<input>", symbol) if values: - d = {} + d = {} exec code in d self.assertEquals(d,values) elif value is not None: self.assertEquals(eval(code,self.eval_d),value) else: self.assert_(code) - + def assertInvalid(self, str, symbol='single', is_syntax=1): '''succeed iff str is the start of an invalid piece of code''' try: @@ -58,7 +58,7 @@ # can be deleted. def test_invalid(self): ai = self.assertInvalid - + ai("del 1") ai("del ()") ai("del (1,)") Modified: trunk/jython/Lib/test/test_import_jy.py =================================================================== --- trunk/jython/Lib/test/test_import_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_import_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -181,7 +181,7 @@ module = os.path.basename(sym) module_obj = __import__(module) self.assertEquals(module_obj.test, 'imported') - + finally: shutil.rmtree(test_support.TESTFN) test_support.unlink(sym) Modified: trunk/jython/Lib/test/test_java_integration.py =================================================================== --- trunk/jython/Lib/test/test_java_integration.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_java_integration.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -4,7 +4,7 @@ import subprocess import sys import re - + from test import test_support from java.lang import (ClassCastException, ExceptionInInitializerError, String, Runnable, System, @@ -62,7 +62,7 @@ self.assertEquals(1, len(called)) m.fireComponentHidden(ComponentEvent(Container(), 0)) self.assertEquals(2, len(called)) - + def test_bean_interface(self): b = BeanImplementation() self.assertEquals("name", b.getName()) @@ -111,7 +111,7 @@ f = open(test_support.TESTFN) self.assertEquals('hello', f.read()) f.close() - + class IOTest(unittest.TestCase): def test_io_errors(self): "Check that IOException isn't mangled into an IOError" @@ -132,11 +132,11 @@ def test_system_in(self): s = System.in self.assert_("java.io.BufferedInputStream" in str(s)) - + def test_runtime_exec(self): e = Runtime.getRuntime().exec self.assert_(re.search("method .*exec", str(e)) is not None) - + def test_byte_class(self): b = Byte(10) self.assert_("java.lang.Byte" in str(b.class)) @@ -183,7 +183,7 @@ def test_in(self): self.assertEquals(self.kws.in(), "in") - + def test_exec(self): self.assertEquals(self.kws.exec(), "exec") @@ -284,7 +284,7 @@ def test_static_fields(self): self.assertEquals(Color(255, 0, 0), Color.RED) - # The bean accessor for getRed should be active on instances, but the static field red + # The bean accessor for getRed should be active on instances, but the static field red # should be visible on the class self.assertEquals(255, Color.red.red) self.assertEquals(Color(0, 0, 255), Color.blue) @@ -416,7 +416,7 @@ self.assertTrue(not x.equals(z)) self.assertNotEquals(x, z) self.assertTrue(not (x == z)) - + class SecurityManagerTest(unittest.TestCase): def test_nonexistent_import_with_security(self): script = test_support.findfile("import_nonexistent.py") @@ -452,13 +452,13 @@ self.assertEquals(7, m.held["initial"], "Existing fields should still be accessible") self.assertEquals(7, m.initial) self.assertEquals(None, m.nonexistent, "Nonexistent fields should be passed on to the Map") - - def test_adding_on_interface(self): + + def test_adding_on_interface(self): GetitemAdder.addPredefined() class UsesInterfaceMethod(FirstPredefinedGetitem): pass self.assertEquals("key", UsesInterfaceMethod()["key"]) - + def test_add_on_mro_conflict(self): """Adding same-named methods to Java classes with MRO conflicts produces TypeError""" GetitemAdder.addPredefined() @@ -479,8 +479,8 @@ self.assertEqual(date_list, unserializer.readObject()) def test_main(): - test_support.run_unittest(InstantiationTest, - BeanTest, + test_support.run_unittest(InstantiationTest, + BeanTest, SysIntegrationTest, IOTest, JavaReservedNamesTest, Modified: trunk/jython/Lib/test/test_module.py =================================================================== --- trunk/jython/Lib/test/test_module.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_module.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -12,7 +12,7 @@ pass else: raise TestFailed, "__name__ = %s" % repr(s) -# __doc__ is None by default in CPython but not in Jython. +# __doc__ is None by default in CPython but not in Jython. # We're not worrying about that now. #vereq(foo.__doc__, module.__doc__) Modified: trunk/jython/Lib/test/test_set_jy.py =================================================================== --- trunk/jython/Lib/test/test_set_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_set_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -20,7 +20,7 @@ self.assertEqual(s & foo, 'rand') self.assertEqual(s ^ foo, 'rxor') - + class SetInJavaTestCase(unittest.TestCase): """Tests for derived dict behaviour""" Modified: trunk/jython/Lib/test/test_xml_etree_jy.py =================================================================== --- trunk/jython/Lib/test/test_xml_etree_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_xml_etree_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -110,7 +110,7 @@ >>> parser = expat.ParserCreate(namespace_separator='!') >>> HANDLER_NAMES = [ ... 'StartElementHandler', 'EndElementHandler', - ... 'CharacterDataHandler', + ... 'CharacterDataHandler', ... 'ProcessingInstructionHandler', ... 'UnparsedEntityDeclHandler', 'NotationDeclHandler', ... 'StartNamespaceDeclHandler', 'EndNamespaceDeclHandler', @@ -451,9 +451,9 @@ def test_entity(): """ - + TODO: need a fallback for entity-resolver so that empty source is returned. - + >>> xml = ''' <!DOCTYPE doc SYSTEM "external.dtd" [ ... <!ENTITY ext-entity SYSTEM "external-entity"> ... ]> Modified: trunk/jython/Lib/test/test_zipimport_jy.py =================================================================== --- trunk/jython/Lib/test/test_zipimport_jy.py 2009-08-10 17:39:21 UTC (rev 6651) +++ trunk/jython/Lib/test/test_zipimport_jy.py 2009-08-10 17:58:16 UTC (rev 6652) @@ -27,5 +27,3 @@ if __name__ == "__main__": test_main() - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |