From: <fwi...@us...> - 2009-08-10 19:01:55
|
Revision: 6657 http://jython.svn.sourceforge.net/jython/?rev=6657&view=rev Author: fwierzbicki Date: 2009-08-10 19:01:48 +0000 (Mon, 10 Aug 2009) Log Message: ----------- Trivial reindents. Modified Paths: -------------- trunk/jython/Lib/test/test_bigmem.py trunk/jython/Lib/test/test_compile_jy.py trunk/jython/Lib/test/test_pythoninterpreter_jy.py trunk/jython/Lib/test/test_sax.py trunk/jython/Lib/test/test_sort.py trunk/jython/Lib/test/test_threading_jy.py trunk/jython/Lib/test/test_trace.py trunk/jython/Lib/test/test_unicode_jy.py trunk/jython/Lib/test/test_userdict.py Modified: trunk/jython/Lib/test/test_bigmem.py =================================================================== --- trunk/jython/Lib/test/test_bigmem.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_bigmem.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -519,7 +519,7 @@ # this might make sense for virtually managed collections, # but PyObjectArray is backed by PyObject[], so that's a hard # limitation of the JVM - + # self.assertRaises(IndexError, operator.getitem, s, len(s) + 1<<31) @bigmemtest(minsize=_2G, memuse=2) @@ -549,7 +549,7 @@ # changed for Jython because the hash code of a java.lang.String # of 0x00's is 0 regardless of size - + @bigmemtest(minsize=_2G + 10, memuse=1) def test_hash(self, size): # Not sure if we can do any meaningful tests here... Even if we Modified: trunk/jython/Lib/test/test_compile_jy.py =================================================================== --- trunk/jython/Lib/test/test_compile_jy.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_compile_jy.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -54,4 +54,4 @@ run_unittest(TestMtime) if __name__ == "__main__": - test_main() + test_main() Modified: trunk/jython/Lib/test/test_pythoninterpreter_jy.py =================================================================== --- trunk/jython/Lib/test/test_pythoninterpreter_jy.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_pythoninterpreter_jy.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -13,7 +13,7 @@ from org.python.core import Py from org.python.util import PythonInterpreter from org.python.core import PySystemState - + ps = PySystemState() pi = PythonInterpreter({}, ps) if locals: @@ -47,7 +47,7 @@ # Some language names from wikipedia u'Català · Česky · Dansk · Deutsch · English · Español · Esperanto · Français · Bahasa Indonesia · Italiano · Magyar · Nederlands · 日本語 · Norsk (bokmål) · Polski · Português · Русский · Română · Slovenčina · Suomi · Svenska · Türkçe · Українська · Volapük · 中文', ] - + def f(): global text for x in text: @@ -65,7 +65,7 @@ out = java.io.StringWriter() err = java.io.StringWriter() exec_code_in_pi(f, out, err) - self.assertEquals(u"42\n", out.toString()) + self.assertEquals(u"42\n", out.toString()) def test_more_output(self): def f(): Modified: trunk/jython/Lib/test/test_sax.py =================================================================== --- trunk/jython/Lib/test/test_sax.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_sax.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -157,7 +157,7 @@ def test_xmlgen_escaped_attr(): result = StringIO() gen = XMLGenerator(result) - + gen.startDocument() gen.startElement("doc", {"x": unicode("\\u3042", "unicode-escape")}) gen.endElement("doc") Modified: trunk/jython/Lib/test/test_sort.py =================================================================== --- trunk/jython/Lib/test/test_sort.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_sort.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -275,17 +275,17 @@ TestDecorateSortUndecorate, TestBugs, ) - + # In the following test cases, class obj, which has function that changes # the data upon which sort is invoked, is passed for "key" argument. - # It can not be checked if that function changes data as long as it is - # invoked(e.g. __del__ in SortKiller). so these are currently commented out. + # It can not be checked if that function changes data as long as it is + # invoked(e.g. __del__ in SortKiller). so these are currently commented out. del TestDecorateSortUndecorate.test_key_with_mutating_del del TestDecorateSortUndecorate.test_key_with_mutating_del_and_exception # test_support.run_unittest(*test_classes) - + # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc Modified: trunk/jython/Lib/test/test_threading_jy.py =================================================================== --- trunk/jython/Lib/test/test_threading_jy.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_threading_jy.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -16,21 +16,21 @@ self.assertEqual(t.getName(), '1') t.setName(2) self.assertEqual(t.getName(), '2') - + # make sure activeCount() gets decremented (see issue 1348) def test_activeCount(self): - activeBefore = threading.activeCount() + activeBefore = threading.activeCount() activeCount = 10 for i in range(activeCount): - t = Thread(target=self._sleep, args=(i,)) - t.setDaemon(0) - t.start() + t = Thread(target=self._sleep, args=(i,)) + t.setDaemon(0) + t.start() polls = activeCount while activeCount > activeBefore and polls > 0: time.sleep(1) activeCount = threading.activeCount() polls -= 1 - self.assertTrue(activeCount <= activeBefore, 'activeCount should to be <= %s, instead of %s' % (activeBefore, activeCount)) + self.assertTrue(activeCount <= activeBefore, 'activeCount should to be <= %s, instead of %s' % (activeBefore, activeCount)) def _sleep(self, n): time.sleep(random.random()) Modified: trunk/jython/Lib/test/test_trace.py =================================================================== --- trunk/jython/Lib/test/test_trace.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_trace.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -740,10 +740,10 @@ tests.append(JumpTestCase) else: del TraceTestCase.test_02_arigo - del TraceTestCase.test_05_no_pop_tops - del TraceTestCase.test_07_raise + del TraceTestCase.test_05_no_pop_tops + del TraceTestCase.test_07_raise del TraceTestCase.test_09_settrace_and_raise - del TraceTestCase.test_10_ireturn + del TraceTestCase.test_10_ireturn del TraceTestCase.test_11_tightloop del TraceTestCase.test_12_tighterloop del TraceTestCase.test_13_genexp Modified: trunk/jython/Lib/test/test_unicode_jy.py =================================================================== --- trunk/jython/Lib/test/test_unicode_jy.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_unicode_jy.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -123,7 +123,7 @@ return f = open(test_support.TESTFN, "w") - self.assertRaises(UnicodeEncodeError, f, write, EURO_SIGN, + self.assertRaises(UnicodeEncodeError, f, write, EURO_SIGN, "Shouldn't be able to write out a Euro sign without first encoding") f.close() @@ -140,7 +140,7 @@ class UnicodeFormatTestCase(unittest.TestCase): - + def test_unicode_mapping(self): assertTrue = self.assertTrue class EnsureUnicode(dict): @@ -158,7 +158,7 @@ class UnicodeStdIOTestCase(unittest.TestCase): - + def setUp(self): self.stdout = sys.stdout Modified: trunk/jython/Lib/test/test_userdict.py =================================================================== --- trunk/jython/Lib/test/test_userdict.py 2009-08-10 18:58:58 UTC (rev 6656) +++ trunk/jython/Lib/test/test_userdict.py 2009-08-10 19:01:48 UTC (rev 6657) @@ -175,7 +175,7 @@ self.assertEqual(eval(`u2`), eval(`d2`)) # end zyasoft ~ - + # Test __cmp__ and __len__ all = [d0, d1, d2, u, u0, u1, u2, uu, uu0, uu1, uu2] for a in all: @@ -219,7 +219,7 @@ # zyasoft - changed the following three assertions to use sets # to remove order dependency - + # Test keys, items, values self.assertEqual(set(u2.keys()), set(d2.keys())) self.assertEqual(set(u2.items()), set(d2.items())) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |