From: <fwi...@us...> - 2009-08-10 17:39:29
|
Revision: 6651 http://jython.svn.sourceforge.net/jython/?rev=6651&view=rev Author: fwierzbicki Date: 2009-08-10 17:39:21 +0000 (Mon, 10 Aug 2009) Log Message: ----------- Trivial reindents. Modified Paths: -------------- trunk/jython/Lib/test/test_builtin_jy.py trunk/jython/Lib/test/test_concat_jy.py trunk/jython/Lib/test/test_descr_jy.py trunk/jython/Lib/test/test_importhooks.py trunk/jython/Lib/test/test_java_subclasses.py trunk/jython/Lib/test/test_jser.py trunk/jython/Lib/test/test_pbcvm.py trunk/jython/Lib/test/test_re_jy.py trunk/jython/Lib/test/test_subclasses.py trunk/jython/Lib/test/test_sys_jy.py Modified: trunk/jython/Lib/test/test_builtin_jy.py =================================================================== --- trunk/jython/Lib/test/test_builtin_jy.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_builtin_jy.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -7,7 +7,7 @@ from codecs import BOM_UTF8 class BuiltinTest(unittest.TestCase): - + def test_in_sys_modules(self): self.assert_("__builtin__" in sys.modules, "__builtin__ not found in sys.modules") @@ -79,7 +79,7 @@ def test_unbound(self): "Unbound methods indicated properly in repr" class Foo: - def bar(s): + def bar(s): pass self.failUnless(repr(Foo.bar).startswith('<unbound method')) @@ -210,8 +210,8 @@ self.assertEqual(eval('locals()', g, d), d) # Verify locals stores (used by list comps) - eval('[locals() for i in (2,3)]', g, d) - eval('[locals() for i in (2,3)]', g, UserDict.UserDict()) + eval('[locals() for i in (2,3)]', g, d) + eval('[locals() for i in (2,3)]', g, UserDict.UserDict()) class SpreadSheet: "Sample application showing nested, calculated lookups." Modified: trunk/jython/Lib/test/test_concat_jy.py =================================================================== --- trunk/jython/Lib/test/test_concat_jy.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_concat_jy.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -83,8 +83,8 @@ def test_main(): - test.test_support.run_unittest(StrUnicodeConcatTestCase, - StrUnicodeConcatOverridesTestCase) + test.test_support.run_unittest(StrUnicodeConcatTestCase, + StrUnicodeConcatOverridesTestCase) if __name__ == "__main__": - test_main() + test_main() Modified: trunk/jython/Lib/test/test_descr_jy.py =================================================================== --- trunk/jython/Lib/test/test_descr_jy.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_descr_jy.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -230,7 +230,7 @@ pass class Bar(object): def __radd__(self, other): - return 3 + return 3 self.assertEqual(Foo() + Bar(), 3) def test_int_mul(self): Modified: trunk/jython/Lib/test/test_importhooks.py =================================================================== --- trunk/jython/Lib/test/test_importhooks.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_importhooks.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -212,4 +212,3 @@ if __name__ == "__main__": test_main() - Modified: trunk/jython/Lib/test/test_java_subclasses.py =================================================================== --- trunk/jython/Lib/test/test_java_subclasses.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_java_subclasses.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -45,7 +45,7 @@ c = ComparableRunner() c.compareTo(None) c.run() - self.assertEquals(calls, ["ComparableRunner.compareTo", "Runner.run"]) + self.assertEquals(calls, ["ComparableRunner.compareTo", "Runner.run"]) class TableModelTest(unittest.TestCase): def test_class_coercion(self): @@ -56,19 +56,19 @@ def getColumnCount(self): return len(self.columnNames) - + def getRowCount(self): return len(self.data) - + def getColumnName(self, col): return self.columnNames[col] def getValueAt(self, row, col): return self.data[row][col] - + def getColumnClass(self, c): return Object.getClass(self.getValueAt(0, c)) - + def isCellEditable(self, row, col): return col >= 2 @@ -127,13 +127,13 @@ def method(self): return "SubDateMethod" - def toString(self): + def toString(self): s = Date.toString(self) return 'SubDate -> Date' class SubSubDate(SubDate, Runnable): def toString(self): - return 'SubSubDate -> ' + SubDate.toString(self) + return 'SubSubDate -> ' + SubDate.toString(self) self.assertEquals("SubDate -> Date", SubDate().toString()) self.assertEquals("SubSubDate -> SubDate -> Date", SubSubDate().toString()) @@ -175,7 +175,7 @@ class A(Component): pass A() - + def test_return_proxy(self): "Jython proxies properly return back from Java code" class FooVector(Vector): @@ -256,7 +256,7 @@ class AbstractOnSyspathTest(unittest.TestCase): '''Subclasses an abstract class that isn't on the startup classpath. - + Checks for http://jython.org/bugs/1861985 ''' def setUp(self): @@ -272,7 +272,7 @@ def test_can_subclass_abstract(self): import Abstract - + class A(Abstract): def method(self): pass @@ -297,7 +297,7 @@ """.decode('base64').decode('zlib') class ContextClassloaderTest(unittest.TestCase): '''Classes on the context classloader should be importable and subclassable. - + http://bugs.jython.org/issue1216''' def setUp(self): self.orig_context = Thread.currentThread().contextClassLoader @@ -360,7 +360,7 @@ import static_proxy # Use the existing environment with the proxy dir added on the classpath - env = dict(os.environ) + env = dict(os.environ) env["CLASSPATH"] = sys.javaproxy_dir script = test_support.findfile("import_as_java_class.py") self.assertEquals(subprocess.call([sys.executable, "-J-Dpython.cachedir.skip=true", Modified: trunk/jython/Lib/test/test_jser.py =================================================================== --- trunk/jython/Lib/test/test_jser.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_jser.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -8,8 +8,8 @@ object1 = 42 object2 = ['a', 1, 1.0] class Foo: - def bar(self): - return 'bar' + def bar(self): + return 'bar' object3 = Foo() object3.baz = 99 Modified: trunk/jython/Lib/test/test_pbcvm.py =================================================================== --- trunk/jython/Lib/test/test_pbcvm.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_pbcvm.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -49,7 +49,7 @@ def test_regrtest_pyc(self): for test in ( # change the names a bit so we don't have to worry about module unloading or spawning a separate JVM - # however, this testing approach too limits the tests that can be run, so we should rewrite to + # however, this testing approach too limits the tests that can be run, so we should rewrite to # use subprocess asap 'test_types_pyc', 'test_exceptions_pyc'): @@ -61,9 +61,9 @@ # typical unsafe ops we have to do in testing... test_support.verbose = self.old_verbosity sys.path.pop(0) - sys.meta_path.pop(0) - + sys.meta_path.pop(0) + def test_main(): test_support.run_unittest(PyBytecodeTest, AdhocRegrtest) Modified: trunk/jython/Lib/test/test_re_jy.py =================================================================== --- trunk/jython/Lib/test/test_re_jy.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_re_jy.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -25,14 +25,14 @@ result = re.sub('bar', 'baz', Foo2('bar')) self.assertEqual(result, Foo2('baz')) self.assert_(isinstance(result, Foo2)) - + def test_unkown_groupname(self): self.assertRaises(IndexError, re.match("(?P<int>\d+)\.(\d*)", '3.14').group, "misspelled") def test_main(): - test.test_support.run_unittest(ReTest) + test.test_support.run_unittest(ReTest) if __name__ == "__main__": - test_main() + test_main() Modified: trunk/jython/Lib/test/test_subclasses.py =================================================================== --- trunk/jython/Lib/test/test_subclasses.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_subclasses.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -1,7 +1,7 @@ from test import test_support import unittest import pickle - + #myint and its test taken from pickletester, the other "my" classes and tests # are based on it. class myint(int): @@ -82,7 +82,7 @@ self.assertEqual(Spam(), 0L) self.assertEqual(str(Spam()), "hi") - + def test_tuple(self): class Spam(tuple): def __str__(self): @@ -181,7 +181,7 @@ s = pickle.dumps(picklee) y = pickle.loads(s) self.assertEqual(picklee, y) - + def test_pickle_builtins(self): #ignores cPickle for now. Modified: trunk/jython/Lib/test/test_sys_jy.py =================================================================== --- trunk/jython/Lib/test/test_sys_jy.py 2009-08-10 17:35:54 UTC (rev 6650) +++ trunk/jython/Lib/test/test_sys_jy.py 2009-08-10 17:39:21 UTC (rev 6651) @@ -75,12 +75,12 @@ from org.python.core import Py from org.python.util import PythonInterpreter from org.python.core import PySystemState - + ps = PySystemState() pi = PythonInterpreter({}, ps) if not sharing: ps.shadow() - ps.builtins = ps.builtins.copy() + ps.builtins = ps.builtins.copy() pi.exec(function.func_code) import threading @@ -94,7 +94,7 @@ import test.sys_jy_test_module # used as a probe # can't use 'foo', test_with wants to have that undefined - sys.builtins['test_sys_jy_foo'] = 42 + sys.builtins['test_sys_jy_foo'] = 42 def set_shadow(): @@ -127,8 +127,8 @@ def test_sys_modules_per_instance(self): import sys self.assertTrue('sys_jy_test_module' not in sys.modules, "sys.modules should be per PySystemState instance") - + def test_main(): test.test_support.run_unittest(SysTest, ShadowingTest) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |