From: <cg...@us...> - 2008-12-28 17:39:07
|
Revision: 5801 http://jython.svn.sourceforge.net/jython/?rev=5801&view=rev Author: cgroves Date: 2008-12-28 17:39:01 +0000 (Sun, 28 Dec 2008) Log Message: ----------- test132 - Moved to org.python.util. test137 - Tested by test_array_jy test145 - Tested by test_java_integration test146 - Tested by test_java_integration test147 - Tested by test_builtin test148 - Tested by test_str test149 - Moved to test_int_jy test150 - Moved to test_java_visibility test151 - Not sure what it was testing; deleted test152 - Tested by regrtest with the tokenize option test153 - Tested by test_java_integration test154 - Not sure what it was testing; deleted test155 - Subclassing Java Python Types as that class from Python is no longer supported; deleted test156 - Tested by test_jser2 test157 - Moved to test_java_visibility test158 - Tested by test_userdict test159 - Tested by test_exceptions test160 - Seems to be testing Java static calling; deleted test161 - Moved to test_java_visibility test162 - Moved Jython specific test to test_class_jy test163 - Module tests handled by test_class_jy; Java test moved to test_java_visibility test164,test165 - Tested by test_str test166 - Tested by test_exceptions test167 - Moved to test_thread_jy test168 - Tested by test_import test169 - Testing jythonc; deleted test170,test171 - Tested by test_cpickle test172 - Moved to test_java_visibility test173 - Tested by test_builtins test174 - Tested by test_classes test175,test176 - Tested by test_list test177 - Tested by test_userdict test178 - Moved to test_grammar_jy test179 - Tested by test_compiler test180 - Tested by test_builtin test181 - Moved to test_grammar_jy test182 - Testing jythonc; deleted test183 - Tested by test_re test184-199 - Testing jythonc; deleted test200 - Tested by test_java_integration test201 - Testing jythonc; deleted test202,203 - Tested by test_jser2 test204,205 - Moved to test_java_visibility test206 - Tested by test_java_integration Modified Paths: -------------- trunk/jython/Lib/test/test_class_jy.py trunk/jython/Lib/test/test_grammar_jy.py trunk/jython/Lib/test/test_java_integration.py trunk/jython/Lib/test/test_java_visibility.py trunk/jython/Lib/test/test_thread_jy.py trunk/jython/tests/java/org/python/tests/Coercions.java trunk/jython/tests/java/org/python/tests/SubVisible.java trunk/jython/tests/java/org/python/tests/VisibilityResults.java trunk/jython/tests/java/org/python/tests/Visible.java trunk/jython/tests/java/org/python/util/InterpreterTest.java Added Paths: ----------- trunk/jython/Lib/test/test_int_jy.py Removed Paths: ------------- trunk/jython/bugtests/classes/test139j1.java trunk/jython/bugtests/classes/test139j2.java trunk/jython/bugtests/classes/test139j3.java trunk/jython/bugtests/classes/test142j.java trunk/jython/bugtests/classes/test160j1.java trunk/jython/bugtests/classes/test160j2.java trunk/jython/bugtests/classes/test182j.java trunk/jython/bugtests/classes/test202j.java trunk/jython/bugtests/classes/test204j0.java trunk/jython/bugtests/classes/test204j1.java trunk/jython/bugtests/classes/test204j2.java trunk/jython/bugtests/classes/test204j3.java trunk/jython/bugtests/classes/test205j0.java trunk/jython/bugtests/classes/test205j1.java trunk/jython/bugtests/classes/test205j2.java trunk/jython/bugtests/classes/test206j0.java trunk/jython/bugtests/classes/test206j1.java trunk/jython/bugtests/test132.py trunk/jython/bugtests/test132j.java trunk/jython/bugtests/test132m.py trunk/jython/bugtests/test137.py trunk/jython/bugtests/test137j.java trunk/jython/bugtests/test145.py trunk/jython/bugtests/test146.py trunk/jython/bugtests/test147.py trunk/jython/bugtests/test148.py trunk/jython/bugtests/test149.py trunk/jython/bugtests/test150.py trunk/jython/bugtests/test151.py trunk/jython/bugtests/test152.py trunk/jython/bugtests/test153.py trunk/jython/bugtests/test154.py trunk/jython/bugtests/test154p/ trunk/jython/bugtests/test155.py trunk/jython/bugtests/test156.py trunk/jython/bugtests/test157.py trunk/jython/bugtests/test157j.java trunk/jython/bugtests/test158.py trunk/jython/bugtests/test159.py trunk/jython/bugtests/test160.py trunk/jython/bugtests/test161.py trunk/jython/bugtests/test162.py trunk/jython/bugtests/test162m.py trunk/jython/bugtests/test163.py trunk/jython/bugtests/test164.py trunk/jython/bugtests/test165.py trunk/jython/bugtests/test166.py trunk/jython/bugtests/test167.py trunk/jython/bugtests/test168.py trunk/jython/bugtests/test168p/ trunk/jython/bugtests/test169.py trunk/jython/bugtests/test169c.py trunk/jython/bugtests/test170.py trunk/jython/bugtests/test170p/ trunk/jython/bugtests/test171.py trunk/jython/bugtests/test171p/ trunk/jython/bugtests/test172.py trunk/jython/bugtests/test172j.java trunk/jython/bugtests/test173.py trunk/jython/bugtests/test173p/ trunk/jython/bugtests/test174.py trunk/jython/bugtests/test175.py trunk/jython/bugtests/test176.py trunk/jython/bugtests/test177.py trunk/jython/bugtests/test178.py trunk/jython/bugtests/test179.py trunk/jython/bugtests/test180.py trunk/jython/bugtests/test181.py trunk/jython/bugtests/test182.py trunk/jython/bugtests/test182c.py trunk/jython/bugtests/test183.py trunk/jython/bugtests/test184.py trunk/jython/bugtests/test184s1.py trunk/jython/bugtests/test184s2.py trunk/jython/bugtests/test185.html trunk/jython/bugtests/test185.py trunk/jython/bugtests/test185a.py trunk/jython/bugtests/test185m.py trunk/jython/bugtests/test186.html trunk/jython/bugtests/test186.py trunk/jython/bugtests/test186a.py trunk/jython/bugtests/test187.py trunk/jython/bugtests/test187c.py trunk/jython/bugtests/test188.py trunk/jython/bugtests/test188c.py trunk/jython/bugtests/test189.py trunk/jython/bugtests/test189c.py trunk/jython/bugtests/test190.py trunk/jython/bugtests/test190c.py trunk/jython/bugtests/test191.py trunk/jython/bugtests/test191c.py trunk/jython/bugtests/test192.html trunk/jython/bugtests/test192.py trunk/jython/bugtests/test192c.py trunk/jython/bugtests/test192c1.py trunk/jython/bugtests/test192c2.py trunk/jython/bugtests/test193.py trunk/jython/bugtests/test193c.py trunk/jython/bugtests/test194.html trunk/jython/bugtests/test194.py trunk/jython/bugtests/test194c.py trunk/jython/bugtests/test194m/ trunk/jython/bugtests/test195.py trunk/jython/bugtests/test195c.py trunk/jython/bugtests/test196.py trunk/jython/bugtests/test196c.py trunk/jython/bugtests/test197.py trunk/jython/bugtests/test197c.py trunk/jython/bugtests/test198.py trunk/jython/bugtests/test198c.py trunk/jython/bugtests/test199.py trunk/jython/bugtests/test199c.py trunk/jython/bugtests/test200.py trunk/jython/bugtests/test200p1.py trunk/jython/bugtests/test201.py trunk/jython/bugtests/test201c.py trunk/jython/bugtests/test202.py trunk/jython/bugtests/test203.py trunk/jython/bugtests/test204.py trunk/jython/bugtests/test205.py trunk/jython/bugtests/test206.py Modified: trunk/jython/Lib/test/test_class_jy.py =================================================================== --- trunk/jython/Lib/test/test_class_jy.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/Lib/test/test_class_jy.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -6,6 +6,7 @@ import __builtin__ import new import unittest +from java.lang import Object from test import test_support class ClassGeneralTestCase(unittest.TestCase): @@ -24,11 +25,14 @@ class Bar(object): pass - self.assertEqual(Bar.__module__, __name__) - self.assertEqual(str(Bar), "<class '%s.Bar'>" % __name__) - self.assertEqual(repr(Bar), "<class '%s.Bar'>" % __name__) - bar = Bar() - self.assert_(str(bar).startswith('<%s.Bar object at' % __name__)) + class Baz(Object): + pass + for cls in Bar, Baz: + self.assertEqual(cls.__module__, __name__) + self.assertEqual(str(cls), "<class '%s.%s'>" % (__name__, cls.__name__)) + self.assertEqual(repr(cls), "<class '%s.%s'>" % (__name__, cls.__name__)) + self.assert_(str(Bar()).startswith('<%s.Bar object at' % __name__)) + self.assert_(str(Baz()).startswith("org.python.proxies.%s$Baz" % __name__)) def test_builtin_attributes(self): Modified: trunk/jython/Lib/test/test_grammar_jy.py =================================================================== --- trunk/jython/Lib/test/test_grammar_jy.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/Lib/test/test_grammar_jy.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -5,7 +5,19 @@ import unittest class GrammarTest(unittest.TestCase): + def test_triple_quote_len(self): + s1 = r""" + \""" 1.triple-quote + \""" 2.triple-quote + """ + s2 = r''' + \""" 1.triple-quote + \""" 2.triple-quote + ''' + self.assert_(not '\r' in s1) + self.assertEquals(len(s1), len(s2)) + def testStringPrefixes(self): self.assertEquals(u"spam",U"spam") self.assertEquals(r"spam", R"spam") Added: trunk/jython/Lib/test/test_int_jy.py =================================================================== --- trunk/jython/Lib/test/test_int_jy.py (rev 0) +++ trunk/jython/Lib/test/test_int_jy.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -0,0 +1,18 @@ +"""Int tests + +Additional tests for Jython. +""" +import unittest +import types +from test import test_support + +class IntTestCase(unittest.TestCase): + + def test_type_matches(self): + self.assert_(isinstance(1, types.IntType)) + +def test_main(): + test_support.run_unittest(IntTestCase) + +if __name__ == '__main__': + test_main() Modified: trunk/jython/Lib/test/test_java_integration.py =================================================================== --- trunk/jython/Lib/test/test_java_integration.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/Lib/test/test_java_integration.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -4,8 +4,7 @@ import re from test import test_support -from java.awt import (Dimension, Component, Rectangle, Button, Color, - HeadlessException) +from java.awt import Dimension, Color, Component, Rectangle from java.util import ArrayList, HashMap, Hashtable, StringTokenizer, Vector from java.io import FileOutputStream, FileWriter, OutputStreamWriter @@ -95,7 +94,6 @@ class ExtendJavaTest(unittest.TestCase): def test_override_tostring(self): - from java.lang import Object, String class A(Object): def toString(self): return 'name' @@ -109,8 +107,6 @@ except TypeError: pass - - class SysIntegrationTest(unittest.TestCase): def test_stdout_outputstream(self): out = FileOutputStream(test_support.TESTFN) @@ -124,7 +120,6 @@ sys.stdout = out class AutoSuperTest(unittest.TestCase): - def test_auto_super(self): class R(Rectangle): def __init__(self): @@ -142,7 +137,6 @@ self.assertRaises(TypeError, Math) class PyObjectCmpTest(unittest.TestCase): - def test_vect_cmp(self): "Check comparing a PyJavaClass with a Object." class X(Runnable): @@ -169,7 +163,6 @@ class VectorTest(unittest.TestCase): - def test_looping(self): for i in Vector(): pass @@ -432,12 +425,10 @@ self.fail("Shouldn't be callable with a no args") self.assertRaises(TypeError, Callbacker.callNoArg, PyBadCallback()) - class JavaStringTest(unittest.TestCase): def test_string_not_iterable(self): - from java import lang - x = lang.String('test') + x = String('test') self.assertRaises(TypeError, list, x) class JavaDelegationTest(unittest.TestCase): Modified: trunk/jython/Lib/test/test_java_visibility.py =================================================================== --- trunk/jython/Lib/test/test_java_visibility.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/Lib/test/test_java_visibility.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +1,10 @@ +import array import unittest from test import test_support -from java.util import HashMap -from org.python.tests import (InterfaceCombination, Invisible, OnlySubclassable, SubVisible, - Visible, VisibleOverride) +from java.lang import Class +from java.util import HashMap, Observable, Observer +from org.python.tests import (Coercions, InterfaceCombination, Invisible, OnlySubclassable, + SubVisible, Visible, VisibleOverride) from org.python.tests import VisibilityResults as Results class VisibilityTest(unittest.TestCase): @@ -21,14 +23,17 @@ Visible.__init__(self, publicValue) else: Visible.__init__(self) + class SubSubVisible(SubVisible): + pass # TODO - protectedStaticMethod, protectedStaticField, StaticInner, and protectedField should # be here - s = SubVisible() - self.assertEquals(Results.PROTECTED_METHOD, s.protectedMethod(0)) - self.assertEquals(Results.OVERLOADED_PROTECTED_METHOD, s.protectedMethod('foo')) - self.assertEquals(Results.UNUSED, SubVisible(Results.UNUSED).visibleField) - self.assertRaises(TypeError, OnlySubclassable, - "Calling a Java class with protected constructors should raise a TypeError") + for cls in SubVisible, SubSubVisible: + s = cls() + self.assertEquals(Results.PROTECTED_METHOD, s.protectedMethod(0)) + self.assertEquals(Results.OVERLOADED_PROTECTED_METHOD, s.protectedMethod('foo')) + self.assertEquals(Results.UNUSED, SubVisible(Results.UNUSED).visibleField) + self.assertRaises(TypeError, OnlySubclassable, + "Calling a Java class with protected constructors should raise a TypeError") class SubSubclassable(OnlySubclassable): pass sub = SubSubclassable() @@ -36,7 +41,26 @@ '''Creating SubSubclassable should call OnlySubclassable's constructor to fill in filledInByConstructor''') + # Check that the protected setChanged method on Observable is visible and propogates + # properly from a python subclass + class TestObservable(Observable): + def __init__(self): + self.props = {} + def set(self, key, val): + self.props[key] = val + self.setChanged() + self.notifyObservers() + to = TestObservable() + self.updated = False + class TestObserver(Observer): + def update(observerself, observable, arg): + self.assertEquals(to, observable) + self.assertEquals(None, arg) + self.updated = True + to.addObserver(TestObserver()) + to.set('k', 'v') + self.assert_(self.updated, "Calling set should notify the added observer") def test_visible(self): v = Visible() @@ -74,6 +98,11 @@ # return the subclass value here. self.assertEquals(Results.SUBCLASS_OVERRIDE, Visible.visibleInstance(s, 3)) self.assertEquals(Results.PUBLIC_STATIC_FIELD, SubVisible.StaticInner.visibleStaticField) + + self.assertEquals(Results.VISIBLE_SHARED_NAME_FIELD, Visible.sharedNameField) + self.assertEquals(Results.SUBVISIBLE_SHARED_NAME_FIELD, SubVisible.sharedNameField) + self.assertEquals(Results.VISIBLE_SHARED_NAME_FIELD * 10, Visible().sharedNameField) + self.assertEquals(Results.SUBVISIBLE_SHARED_NAME_FIELD * 10, s.sharedNameField) def test_in_dict(self): @@ -104,14 +133,25 @@ 'java.lang.Class bean methods should be visible on instances') self.assertEquals(3, len(HashMap.getInterfaces())) + def test_python_fields(self): + self.assertEquals('java.util', HashMap.__module__) + self.assertEquals(Class, HashMap.__class__) + self.assertEquals(None, HashMap.__doc__) + class NumberCoercionTest(unittest.TestCase): def test_int_coercion(self): - from org.python.tests import Coercions c = Coercions() self.assertEquals("5", c.takeInt(5)) self.assertEquals("15", c.takeInteger(15)) self.assertEquals("150", c.takeNumber(150)) + def test_array_coercion(self): + self.assertEquals("double", Coercions.takeArray(array.zeros('d', 2))) + self.assertEquals("float", Coercions.takeArray(array.zeros('f', 2))) + self.assertEquals("4", Coercions.takePyObj(1, 2, 3, 4)) + c = Coercions() + self.assertEquals("5", c.takePyObjInst(1, 2, 3, 4, 5)) + def test_main(): test_support.run_unittest(VisibilityTest, JavaClassTest, Modified: trunk/jython/Lib/test/test_thread_jy.py =================================================================== --- trunk/jython/Lib/test/test_thread_jy.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/Lib/test/test_thread_jy.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,6 +1,9 @@ import thread +import synchronize import unittest import test.test_support +from java.lang import Thread +from java.util.concurrent import CountDownLatch class AllocateLockTest(unittest.TestCase): @@ -10,8 +13,23 @@ self.assertEquals(t, type(thread.allocate_lock()), "thread.LockType has wrong value") +class SynchronizeTest(unittest.TestCase): + def test_make_synchronized(self): + self.doneSignal = CountDownLatch(10) + self.i = 0 + class SynchedRun(Thread): + def run(synchself): + self.i = self.i + 1 + self.doneSignal.countDown() + run = synchronize.make_synchronized(run) + for _ in xrange(10): + SynchedRun().start() + self.doneSignal.await() + self.assertEquals(10, self.i) + + def test_main(): - test.test_support.run_unittest(AllocateLockTest) + test.test_support.run_unittest(AllocateLockTest, SynchronizeTest) if __name__ == "__main__": test_main() Deleted: trunk/jython/bugtests/classes/test139j1.java =================================================================== --- trunk/jython/bugtests/classes/test139j1.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test139j1.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,4 +0,0 @@ - -public class test139j1 { - public void foo() {} -} Deleted: trunk/jython/bugtests/classes/test139j2.java =================================================================== --- trunk/jython/bugtests/classes/test139j2.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test139j2.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,4 +0,0 @@ - -public interface test139j2 { - public void bar(); -} Deleted: trunk/jython/bugtests/classes/test139j3.java =================================================================== --- trunk/jython/bugtests/classes/test139j3.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test139j3.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,6 +0,0 @@ - -public class test139j3 { - public static boolean baz(test139j1 o) { - return o instanceof test139j2; - } -} Deleted: trunk/jython/bugtests/classes/test142j.java =================================================================== --- trunk/jython/bugtests/classes/test142j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test142j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,27 +0,0 @@ - -import org.python.core.*; - -public class test142j extends PyObject { - double[] data; - int len; - public test142j(double[] darray) { - data=darray; - len=data.length; - } - public int __len__() { - return len; - } - - public PyString __repr__() { - StringBuffer buf = new StringBuffer(); - for(int i=0; i<len; i++) { - buf.append(data[i]); - buf.append(", "); - } - return new PyString(buf.toString()); - } - - public static test142j new$(double[] array) { - return new test142j(array); - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test160j1.java =================================================================== --- trunk/jython/bugtests/classes/test160j1.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test160j1.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,18 +0,0 @@ - -public class test160j1 { - public static test160j1 clField; - - public void go() { - clField = this; - test160j2 b = new test160j2(); - } - - public String func() { - return "success!"; - } - - public static void main( String[] arg ) { - test160j1 a = new test160j1(); - a.go(); - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test160j2.java =================================================================== --- trunk/jython/bugtests/classes/test160j2.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test160j2.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,6 +0,0 @@ - -public class test160j2 { - public test160j2() { - test160j1.clField.func(); - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test182j.java =================================================================== --- trunk/jython/bugtests/classes/test182j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test182j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,46 +0,0 @@ - -public abstract class test182j { - public String tstPublic() { - return "tstPublic"; - } - - protected String tstProtected() { - return "tstProtected"; - } - - final protected String tstFinalProtected() { - return "tstFinalProtected"; - } - - final public String tstFinalPublic() { - return "tstFinalPublic"; - } - - - - public String tstOverridePublic() { - return "tstOverridePublic"; - } - - protected String tstOverrideProtected() { - return "tstOverrideProtected"; - } - - final protected String tstOverrideFinalProtected() { - return "tstOverrideFinalProtected"; - } - - final public String tstOverrideFinalPublic() { - return "tstOverrideFinalPublic"; - } - - - abstract public String tstAbstractPublic(); - - abstract protected String tstAbstractProtected(); - - abstract public String tstOverrideAbstractPublic(); - - abstract protected String tstOverrideAbstractProtected(); - -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test202j.java =================================================================== --- trunk/jython/bugtests/classes/test202j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test202j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,5 +0,0 @@ - - -public class test202j implements java.io.Serializable { - public int a = 1; -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test204j0.java =================================================================== --- trunk/jython/bugtests/classes/test204j0.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test204j0.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,4 +0,0 @@ - -public interface test204j0 { - public long getClassID(); -} Deleted: trunk/jython/bugtests/classes/test204j1.java =================================================================== --- trunk/jython/bugtests/classes/test204j1.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test204j1.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ - -public class test204j1 implements test204j0 { - public static final long classID = 2041; - - public long getClassID() { - return classID*2; - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test204j2.java =================================================================== --- trunk/jython/bugtests/classes/test204j2.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test204j2.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ - -public class test204j2 extends test204j1 { - public static final long classID = 2042; - - public long getClassID() { - return classID*2; - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test204j3.java =================================================================== --- trunk/jython/bugtests/classes/test204j3.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test204j3.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ - -public class test204j3 extends test204j1 { - public static final long classID = 2043; - - public long getClassID() { - return classID*2; - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test205j0.java =================================================================== --- trunk/jython/bugtests/classes/test205j0.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test205j0.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,4 +0,0 @@ - -public interface test205j0 { - public long getClassID(); -} Deleted: trunk/jython/bugtests/classes/test205j1.java =================================================================== --- trunk/jython/bugtests/classes/test205j1.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test205j1.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ - -public class test205j1 implements test205j0 { - public static final long classID = 2051; - - public long getClassID() { - return classID*10; - } - -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test205j2.java =================================================================== --- trunk/jython/bugtests/classes/test205j2.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test205j2.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ - -public class test205j2 extends test205j1 { - public static final long classID = 2052; - - public long getClassID() { - return classID*10; - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/classes/test206j0.java =================================================================== --- trunk/jython/bugtests/classes/test206j0.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test206j0.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,4 +0,0 @@ - -interface test206j0 { - public int getInt(); -} Deleted: trunk/jython/bugtests/classes/test206j1.java =================================================================== --- trunk/jython/bugtests/classes/test206j1.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/classes/test206j1.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ - -public class test206j1 implements test206j0 { - public int getInt() { - return 3; - } - public int getInt2() { - return 4; - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/test132.py =================================================================== --- trunk/jython/bugtests/test132.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test132.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ -""" - -""" - -import support - -support.compileJava("test132j.java") - -import test132j -test132j.main(None) - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test132j.java =================================================================== --- trunk/jython/bugtests/test132j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test132j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,14 +0,0 @@ -import org.python.core.*; -import org.python.util.PythonInterpreter; - -public class test132j { - public static void main(String[] args) { - PythonInterpreter interp = new PythonInterpreter(); - interp.execfile("test132m.py"); - PyObject FooClass = interp.get("Foo"); - PyObject fooInstance = FooClass.__call__(new PyInteger(42)); - for (int i=0; i<4; i++) { - fooInstance.invoke("execute"); - } - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/test132m.py =================================================================== --- trunk/jython/bugtests/test132m.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test132m.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,7 +0,0 @@ - -class Foo: - def __init__(self, x): - self.x = x - - def execute(self): - return self.x \ No newline at end of file Deleted: trunk/jython/bugtests/test137.py =================================================================== --- trunk/jython/bugtests/test137.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test137.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,17 +0,0 @@ -""" - -""" - -import support - -support.compileJava("test137j.java") - -import jarray -a = jarray.array(range(5), 'i') - -import test137j - - -test137j.zeroOutArray(a) -if a[-1] != 0: - raise support.TestError("All elements should be 0") Deleted: trunk/jython/bugtests/test137j.java =================================================================== --- trunk/jython/bugtests/test137j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test137j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ - -public class test137j { - public static void zeroOutArray(int [] array){ - for(int i=0; i < array.length; i++){ - array[i] = 0; - } - } -} \ No newline at end of file Deleted: trunk/jython/bugtests/test145.py =================================================================== --- trunk/jython/bugtests/test145.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test145.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" -Check autocreate of proxy. -""" - -import support - -import java - -class myPanel(java.awt.Panel) : - def __init__(self) : - self.layout = java.awt.GridLayout(1,2) - -p = myPanel() -if p.layout != p.getLayout(): - raise support.TestError("Should be same") Deleted: trunk/jython/bugtests/test146.py =================================================================== --- trunk/jython/bugtests/test146.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test146.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,16 +0,0 @@ -""" - -""" - -import support - -from javax.swing import * -class TestAction(AbstractAction): - def __init__(self, verb): - AbstractAction.__init__(self, verb) - def actionPerformed(self, evt): - print str(self.getValue(Action.NAME)) + " performed by " + str(self) - -m = TestAction("Crash") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test147.py =================================================================== --- trunk/jython/bugtests/test147.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test147.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,11 +0,0 @@ -""" - -""" - -import support - -if 'abc' is 'a'+'b'+'c': - raise support.TestError("Test1") -if not intern('abc') is intern('a'+'b'+'c'): - raise support.TestError("Test2") - Deleted: trunk/jython/bugtests/test148.py =================================================================== --- trunk/jython/bugtests/test148.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test148.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ -""" - -""" - -import support - -import string -support.compare(string.replace("Synnove Finden Meierier ASA", "AS", "B"), "Synnove Finden Meierier BA") - Deleted: trunk/jython/bugtests/test149.py =================================================================== --- trunk/jython/bugtests/test149.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test149.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ -""" - -""" - -import support - -from types import * -if not isinstance(1, IntType): - raise support.TestError("Test") Deleted: trunk/jython/bugtests/test150.py =================================================================== --- trunk/jython/bugtests/test150.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test150.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,27 +0,0 @@ -""" -setChanged was not found. -""" - -import support - -from java.util import Observable -class TestProperties( Observable ): - def __init__( self ): - self.props = { - 'logFileDir' : "./", - 'logFileName' : "testLog.txt", - 'maxFailures' : 1, - } - - def get( self, name ): - return self.props[ name ] - - def set( self, name, value ): - self.props[ name ] = value - self.notifyObservers() - self.setChanged() - -t = TestProperties() -t.set("k", "v") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test151.py =================================================================== --- trunk/jython/bugtests/test151.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test151.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" - -""" - -import support - -class Test: - def method1( self ): - __local = "buttercup" - __local - - -Test().method1() - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test152.py =================================================================== --- trunk/jython/bugtests/test152.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test152.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,24 +0,0 @@ -""" - -""" - -import support - -import tokenize - -f = open("test152.out", "w") -f.write("for i in range(1,10):") -f.close() - -f = open("test152.out") - -s = "" -def gettoken(type, token, (srow, scol), (erow, ecol), line): # for testing - global s - s = s + " " + token - -r = tokenize.tokenize(f.readline, gettoken) - -support.compare(s, "for") - -#raise support.TestError("Should raise") Deleted: trunk/jython/bugtests/test153.py =================================================================== --- trunk/jython/bugtests/test153.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test153.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,14 +0,0 @@ -""" - -""" - -import support - -from java.util import Hashtable -class Test(Hashtable): - def isEmpty(self): - return Hashtable.isEmpty(self) - -t = Test() -if not t.isEmpty(): - raise support.TestError("Should be empty") Deleted: trunk/jython/bugtests/test154.py =================================================================== --- trunk/jython/bugtests/test154.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test154.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,14 +0,0 @@ -""" - -""" - -import support - -import test154p -from test154p.testing import testing - -reload(test154p.testing) -reload(test154p.testing) -reload(test154p.testing) - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test155.py =================================================================== --- trunk/jython/bugtests/test155.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test155.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,20 +0,0 @@ -""" - -""" - -import support - -#raise support.TestError("Test removed, it destroyes the test environment") - - -from org.python.core import PyList -class Test2(PyList): - def foo(self): - return self[0] - -y = Test2() -y.append('spam') -v = y.foo() - -if v != "spam": - raise support.TestError("Should return 'spam' : " + `v`) Deleted: trunk/jython/bugtests/test156.py =================================================================== --- trunk/jython/bugtests/test156.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test156.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,36 +0,0 @@ -""" -#unitcheck -""" - -import support - -import sys, org -from java import io -from java.awt import Panel - -class MyPanel (Panel): - pass - -def serialize_object (obj, filename): - #print "serializing", obj, "to", filename - file = io.FileOutputStream (filename) - objstream = io.ObjectOutputStream (file) - objstream.writeObject (obj) - objstream.close() ; file.close() - #print "done" - -def unserialize_object (filename): - #print "reading serialized object from", filename - file = io.FileInputStream (filename) - objstream = org.python.util.PythonObjectInputStream (file) - obj = objstream.readObject () - objstream.close() ; file.close() - #print "unserialized", obj - -filename = 'test156.ser' - -p = MyPanel () -serialize_object (p, filename) -unserialize_object (filename) - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test157.py =================================================================== --- trunk/jython/bugtests/test157.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test157.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,22 +0,0 @@ -""" - -""" - -import support - -support.compileJava("test157j.java") - -import test157j - -from jarray import * -f = zeros(2,'d'); -support.compare(test157j.test(f), "double"); -if f[0] == 0: - raise support.TestError("array not changed") - - -f = zeros(2,'f'); -support.compare(test157j.test(f), "float"); -if f[0] == 0: - raise support.TestError("array not changed") - Deleted: trunk/jython/bugtests/test157j.java =================================================================== --- trunk/jython/bugtests/test157j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test157j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,11 +0,0 @@ - -public class test157j { - public static String test(double[] arr) { - arr[0]=100; - return "double"; - } - public static String test(float[] arr) { - arr[0]=100; - return "float"; - } -} Deleted: trunk/jython/bugtests/test158.py =================================================================== --- trunk/jython/bugtests/test158.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test158.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,14 +0,0 @@ -""" - -""" - -import support - -alfa = {} -alfa["test"] = "test1" -try: - del alfa["beta"] -except KeyError, e: - pass -else: - raise support.TestError("Should raise") Deleted: trunk/jython/bugtests/test159.py =================================================================== --- trunk/jython/bugtests/test159.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test159.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ -""" - -""" - -import support - -try: - raise RuntimeError -except RuntimeError: - pass -else: - raise support.TestError("Should raise") Deleted: trunk/jython/bugtests/test160.py =================================================================== --- trunk/jython/bugtests/test160.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test160.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,13 +0,0 @@ -""" - -""" - -import support - -support.compileJava("classes/test160j1.java") - -import test160j1 -a = test160j1() -a.go() - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test161.py =================================================================== --- trunk/jython/bugtests/test161.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test161.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" - -""" - -import support - -from javax import swing -class a(swing.JPanel): - pass - -class b(a): - pass - - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test162.py =================================================================== --- trunk/jython/bugtests/test162.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test162.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ -""" - -""" - -import support - -import test162m -support.compare(test162m.ParentlessClass.__module__, "test162m") -support.compare(test162m.DerivedPyClass.__module__, "test162m") -support.compare(test162m.DerivedJClass.__module__, "test162m") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test162m.py =================================================================== --- trunk/jython/bugtests/test162m.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test162m.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,11 +0,0 @@ - -import java, java.lang - -class ParentlessClass: - pass - -class DerivedPyClass(ParentlessClass): - pass - -class DerivedJClass(java.lang.Object): - pass \ No newline at end of file Deleted: trunk/jython/bugtests/test163.py =================================================================== --- trunk/jython/bugtests/test163.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test163.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,28 +0,0 @@ -""" - -""" - -import support - -from java.lang import Object - -class A: - pass - -class B(A): - pass - -class C(Object): - pass - -class D: - pass - -support.compare(A.__module__, "__main__|test163") -support.compare(B.__module__, "__main__|test163") -support.compare(C.__module__, "__main__|test163") -support.compare(D.__module__, "__main__|test163") -if hasattr(Object, "__module__"): - raise support.TestError("a java object should not have a __module__") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test164.py =================================================================== --- trunk/jython/bugtests/test164.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test164.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,10 +0,0 @@ -""" - -""" - -import support - -import string -support.compare(string.replace ("2. .. 3.", ". .", " ."), "2 \.\. 3\.") - - Deleted: trunk/jython/bugtests/test165.py =================================================================== --- trunk/jython/bugtests/test165.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test165.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,10 +0,0 @@ -""" - -""" - -import support - -support.compare("%g" % 1, "1") -support.compare("%g .. %g" % (1,2), "1 .. 2") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test166.py =================================================================== --- trunk/jython/bugtests/test166.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test166.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,13 +0,0 @@ -""" - -""" - -import support - -try: - raise KeyError, "abc" -except KeyError, value: - support.compare(value, "abc") - support.compare(value.__class__, "exceptions.KeyError") - - Deleted: trunk/jython/bugtests/test167.py =================================================================== --- trunk/jython/bugtests/test167.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test167.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" - -""" - -import support - - -from java import lang -import synchronize - -class test167(lang.Thread): - def run(self): pass - run = synchronize.make_synchronized(run) - -test167().start() \ No newline at end of file Deleted: trunk/jython/bugtests/test168.py =================================================================== --- trunk/jython/bugtests/test168.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test168.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,7 +0,0 @@ - -import test168p - -import support - -support.compare(test168p.foo(), "foo") -support.compare(test168p.bar.bar(), "bar") Deleted: trunk/jython/bugtests/test169.py =================================================================== --- trunk/jython/bugtests/test169.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test169.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ -""" - -""" - -import support - -support.compileJPythonc("test169c.py", core=1, jar="test169c.jar", output="test169.err") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test169c.py =================================================================== --- trunk/jython/bugtests/test169c.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test169c.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,11 +0,0 @@ - -#import urllib - -a = None -if string.split('abc'): - a = "abc" - -if a: - import base64 - -import base64 \ No newline at end of file Deleted: trunk/jython/bugtests/test170.py =================================================================== --- trunk/jython/bugtests/test170.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test170.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,24 +0,0 @@ -""" - -""" - -import support - -import cPickle, cStringIO - -#print cPickle.__version__ - -import test170p.Stack - -s = test170p.Stack.Stack() - -#print s - -cs = cStringIO.StringIO() - -cPickle.dump(s, cs) -#print cs.getvalue() -cs.seek(0) -cPickle.load(cs) - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test171.py =================================================================== --- trunk/jython/bugtests/test171.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test171.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" - -""" - -import support - -import cPickle - -import test171p.Stack - -s = test171p.Stack.Stack() - -cPickle.dumps(s) - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test172.py =================================================================== --- trunk/jython/bugtests/test172.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test172.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,11 +0,0 @@ - - -import support - -support.compileJava("test172j.java") - -import test172j - -support.compare(test172j.foo(1,2,3,4), "foo called with 4 arguments") - -support.compare(test172j().bar(1,2,3,4), "bar called with 4 arguments") Deleted: trunk/jython/bugtests/test172j.java =================================================================== --- trunk/jython/bugtests/test172j.java 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test172j.java 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ - -import org.python.core.*; - -public class test172j { - public static String foo(PyObject[] args) { - return "foo called with " + args.length + " arguments"; - } - - public String bar(PyObject[] args) { - return "bar called with " + args.length + " arguments"; - } -} Deleted: trunk/jython/bugtests/test173.py =================================================================== --- trunk/jython/bugtests/test173.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test173.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,6 +0,0 @@ - -import support - - -import test173p -support.compare(test173p, "sys") \ No newline at end of file Deleted: trunk/jython/bugtests/test174.py =================================================================== --- trunk/jython/bugtests/test174.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test174.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,21 +0,0 @@ - -import support - -class A: - def foo(self): - return "A.foo" - -class B: - def foo(self): - return "B.foo" - -class C(A, B): - pass - - -list(C.__bases__).reverse() - - -c = C() -#print c.foo -support.compare(c.foo(), "A.foo") Deleted: trunk/jython/bugtests/test175.py =================================================================== --- trunk/jython/bugtests/test175.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test175.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,6 +0,0 @@ - -import support - -t = (1,2,3) -list(t).reverse() -support.compare(t, "1, 2, 3") Deleted: trunk/jython/bugtests/test176.py =================================================================== --- trunk/jython/bugtests/test176.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test176.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,13 +0,0 @@ -""" -Check that a list based on a tuple can not change the tuple -""" - -import support - -t1 = (1,2,3) -t2 = (1,2,3) -list(t1).reverse() - -if t1 != t2: - raise support.TestError('tuple was modified.') - Deleted: trunk/jython/bugtests/test177.py =================================================================== --- trunk/jython/bugtests/test177.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test177.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ -""" -Check that two equal, but diffrently sorted dict compare equal. -""" - -import support - -d1 = {'status':1, 'background':2, 'borderwidth':3, 'foreground':4} -d2 = {'status':1, 'background':2, 'foreground':4, 'borderwidth':3} - -if d1 != d2: - raise support.TestError('equal dicts does not compare equal.') - Deleted: trunk/jython/bugtests/test178.py =================================================================== --- trunk/jython/bugtests/test178.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test178.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,20 +0,0 @@ - -import support - -s1 = r""" - \""" 1.triple-quote - \""" 2.triple-quote -""" - -s2 = r''' - \""" 1.triple-quote - \""" 2.triple-quote -''' - - -for i in range(len(s2)): - if s1[i] != s2[i]: print "diff at", i - - -if s1 != s2: - raise support.TestError, "TQS different" \ No newline at end of file Deleted: trunk/jython/bugtests/test179.py =================================================================== --- trunk/jython/bugtests/test179.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test179.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,22 +0,0 @@ -""" - The traceback linenumber does not match the throw line. -""" -import support - -def foo(): - assert 0 - -try: - try: - - - foo() - - - - finally: - pass -except: - import sys - info = sys.exc_info() - support.compare(info[2].tb_lineno, "13") Deleted: trunk/jython/bugtests/test180.py =================================================================== --- trunk/jython/bugtests/test180.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test180.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,18 +0,0 @@ -""" - -""" - -import support - - -class A: - def __init__(self): - self.foo = 'bar' - -def f(*args, **kw): - #print args, kw - support.compare(args, "(1, 2, 3)") - support.compare(kw, "{'foo': 'bar'}") - -apply(f, (1,2,3), A().__dict__) - Deleted: trunk/jython/bugtests/test181.py =================================================================== --- trunk/jython/bugtests/test181.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test181.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,15 +0,0 @@ -""" -Test TQS -""" - -import support - -s1 = r""" - \""" 1.triple-quote - \""" 2.triple-quote -""" - -import string - -if '\r' in s1: - raise support.TestError, "TQS should not contain CR" \ No newline at end of file Deleted: trunk/jython/bugtests/test182.py =================================================================== --- trunk/jython/bugtests/test182.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test182.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,12 +0,0 @@ -""" - -""" - -import support - -support.compileJava("classes/test182j.java") - -support.compileJPythonc("test182c.py", core=1, jar="test182c.jar", output="test182.err") -support.runJava("test182c", classpath="test182c.jar") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test182c.py =================================================================== --- trunk/jython/bugtests/test182c.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test182c.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,38 +0,0 @@ - -import support - -import test182j - -class test182c(test182j): - def tstOverridePublic(self): - #print "her1" - return "test182c." + test182j.tstOverridePublic(self) - def tstOverrideProtected(self): - #print "her2" - return "test182c." + self.super__tstOverrideProtected() - def tstOverrideFinalProtected(self): - return "test182c." + self.super__tstOverrideFinalProtected() - def tstOverrideFinalPublic(self): - return "test182c." + test182j.tstOverrideFinalPublic(self) - - def tstAbstractPublic(self): - return "test182c.tstAbstractPublic" - def tstAbstractProtected(self): - return "test182c.tstAbstractProtected" - -i = test182c() - -support.compare(i.tstPublic(), "tstPublic") -support.compare(i.tstProtected(), "tstProtected") -support.compare(i.super__tstFinalProtected(), "tstFinalProtected") -support.compare(i.tstFinalPublic(), "tstFinalPublic") - - -support.compare(i.tstOverridePublic(), "test182c.tstOverridePublic") -support.compare(i.tstOverrideProtected(), "test182c.tstOverrideProtected") -support.compare(i.tstOverrideFinalProtected(), "test182c.tstOverrideFinalProtected") -support.compare(i.tstOverrideFinalPublic(), "test182c.tstOverrideFinalPublic") - - -support.compare(i.tstAbstractPublic(), "test182c.tstAbstractPublic") -support.compare(i.tstAbstractProtected(), "test182c.tstAbstractProtected") Deleted: trunk/jython/bugtests/test183.py =================================================================== --- trunk/jython/bugtests/test183.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test183.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,19 +0,0 @@ -""" -Test the re.M flag. Fails when using re. Success with sre. -""" - -import support - -import re - -var ="T\nO" - -m = re.search("^O",var,re.M) -if m == None: - raise support.TestError("Should match") - - -m = re.search("^O",var) -if m != None: - raise support.TestError("Should not match") - Deleted: trunk/jython/bugtests/test184.py =================================================================== --- trunk/jython/bugtests/test184.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test184.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ -""" - -""" - -import support - -support.compileJPythonc("test184s1.py", "test184s2.py", deep=1, output="test184.err") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test184s1.py =================================================================== --- trunk/jython/bugtests/test184s1.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test184s1.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,16 +0,0 @@ - -from javax.servlet.http import HttpServlet - -import test184p - -class test184s1(HttpServlet): - def doGet(self, request, response): - response.setContentType("text/html") - out = response.getOutputStream() - out.println("<html>") - out.println("<head> <title> JPython test184s1 servlet </title></head>") - out.println("<body> <h2> Hello World! JPython %s </h2> </body>" % test184p.foo()) - out.println(" </html>") - - -print test184s1, Exception Deleted: trunk/jython/bugtests/test184s2.py =================================================================== --- trunk/jython/bugtests/test184s2.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test184s2.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,17 +0,0 @@ - -from javax.servlet.http import * - -import test184p - - -class test184s2(HttpServlet): - def doGet(self, request, response): - response.setContentType("text/html") - out = response.getOutputStream() - out.println("<html>") - out.println("<head> <title> JPython test184s2 servlet </title></head>") - out.println("<body> <h2> Hello World! JPython %s </h2> </body>" % test184p.foo()) - out.println(" </html>") - - -print test184s2, ServletConfig Deleted: trunk/jython/bugtests/test185.html =================================================================== --- trunk/jython/bugtests/test185.html 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test185.html 2008-12-28 17:39:01 UTC (rev 5801) @@ -1 +0,0 @@ -<applet code="test185a" archive="test185.jar" width=300 height=200></applet> \ No newline at end of file Deleted: trunk/jython/bugtests/test185.py =================================================================== --- trunk/jython/bugtests/test185.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test185.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,9 +0,0 @@ -""" - -""" - -import support - -support.compileJPythonc("test185a.py", core=1, jar="test185.jar", output="test185.err") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test185a.py =================================================================== --- trunk/jython/bugtests/test185a.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test185a.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,20 +0,0 @@ -from java.awt import Frame -from java.applet import Applet -from test185m import * - -class test185a(Applet): - def __init__(self): - self.mydd = dd() - self.add(self.mydd) - - -class foo: - pass - -class bar(foo): - pass - -if __name__ == "__main__": - f = Frame(); c = c() - f.add(c); f.pack(); f.show() - Deleted: trunk/jython/bugtests/test185m.py =================================================================== --- trunk/jython/bugtests/test185m.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test185m.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,7 +0,0 @@ - -from java.awt import * - -class dd(Panel): - def __init__(self): - self.add(Label("Running")) - \ No newline at end of file Deleted: trunk/jython/bugtests/test186.html =================================================================== --- trunk/jython/bugtests/test186.html 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test186.html 2008-12-28 17:39:01 UTC (rev 5801) @@ -1 +0,0 @@ -<applet code="com.mycompany.mypackage.test186a" archive="test186.jar" width=300 height=200></applet> \ No newline at end of file Deleted: trunk/jython/bugtests/test186.py =================================================================== --- trunk/jython/bugtests/test186.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test186.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,10 +0,0 @@ -""" - -""" - -import support - -support.compileJPythonc("test186a.py", core=1, package="com.mycompany.mypackage", - jar="test186.jar", output="test186.err") - -#raise support.TestError("" + `x`) Deleted: trunk/jython/bugtests/test186a.py =================================================================== --- trunk/jython/bugtests/test186a.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test186a.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,17 +0,0 @@ -import java - -# Define a Python class that subclasses the Applet class -# (java.applet.Applet) - -class test186a (java.applet.Applet): - def __init__(self): - self.list = java.awt.List() - self.add(self.list) - def init(self): - self.list.add("Init called") - def destroy(self): - self.list.add("Destroy called") - def start(self): - self.list.add("Start called") - def stop(self): - self.list.add("Stop called") Deleted: trunk/jython/bugtests/test187.py =================================================================== --- trunk/jython/bugtests/test187.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test187.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,8 +0,0 @@ -""" - -""" - -import support - -support.compileJPythonc("test187c.py", output="test187.err") - Deleted: trunk/jython/bugtests/test187c.py =================================================================== --- trunk/jython/bugtests/test187c.py 2008-12-25 15:30:20 UTC (rev 5800) +++ trunk/jython/bugtests/test187c.py 2008-12-28 17:39:01 UTC (rev 5801) @@ -1,40 +0,0 @@ - -def a1(): - if a: - return 22 - else: - return 10 - print "abc" - - -def a2(): - if a: - return 22 - else: - return 10 - return None - - -def a3(): - """docstring""" - if a: - return 22 - else: - return 10 - 5 - -def a4(): - """docstring""" - a = 1 - raise "Error", 1 - b... [truncated message content] |