diff options
Diffstat (limited to 'py/test')
37 files changed, 581 insertions, 581 deletions
diff --git a/py/test/Ice/adapterDeactivation/AllTests.py b/py/test/Ice/adapterDeactivation/AllTests.py index c3f710815ae..d8d1015b099 100644 --- a/py/test/Ice/adapterDeactivation/AllTests.py +++ b/py/test/Ice/adapterDeactivation/AllTests.py @@ -32,8 +32,8 @@ def allTests(communicator): sys.stdout.flush() adapter = communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9999") try: - communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9998") - test(False) + communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9998") + test(False) except Ice.LocalException: pass adapter.destroy() @@ -55,9 +55,9 @@ def allTests(communicator): print "testing whether server is gone... ", sys.stdout.flush() try: - obj.ice_ping() - test(False) + obj.ice_ping() + test(False) except Ice.LocalException: - print "ok" + print "ok" return obj diff --git a/py/test/Ice/adapterDeactivation/Client.py b/py/test/Ice/adapterDeactivation/Client.py index 7dc71fe4b4b..276ac66456c 100644 --- a/py/test/Ice/adapterDeactivation/Client.py +++ b/py/test/Ice/adapterDeactivation/Client.py @@ -26,7 +26,7 @@ import Test, AllTests class TestClient(Ice.Application): def run(self, args): - AllTests.allTests(self.communicator()) + AllTests.allTests(self.communicator()) return 0 app = TestClient() diff --git a/py/test/Ice/adapterDeactivation/Collocated.py b/py/test/Ice/adapterDeactivation/Collocated.py index cf1f6b1751b..10673221477 100644 --- a/py/test/Ice/adapterDeactivation/Collocated.py +++ b/py/test/Ice/adapterDeactivation/Collocated.py @@ -33,7 +33,7 @@ class TestServer(Ice.Application): adapter.addServantLocator(locator, "") adapter.activate() - AllTests.allTests(self.communicator()) + AllTests.allTests(self.communicator()) adapter.waitForDeactivate() return 0 diff --git a/py/test/Ice/adapterDeactivation/Server.py b/py/test/Ice/adapterDeactivation/Server.py index adaea8c1834..23e756c4c0c 100644 --- a/py/test/Ice/adapterDeactivation/Server.py +++ b/py/test/Ice/adapterDeactivation/Server.py @@ -26,7 +26,7 @@ import Test, TestI class TestServer(Ice.Application): def run(self, args): - self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000:udp") + self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000:udp") adapter = self.communicator().createObjectAdapter("TestAdapter") locator = TestI.ServantLocatorI() diff --git a/py/test/Ice/application/Client.py b/py/test/Ice/application/Client.py index 1bb86f5a958..52adb766674 100644 --- a/py/test/Ice/application/Client.py +++ b/py/test/Ice/application/Client.py @@ -12,46 +12,46 @@ import sys, Ice, time class Client(Ice.Application): def interruptCallback(self, sig): - print "handling signal " + str(sig) + print "handling signal " + str(sig) # SIGINT interrupts time.sleep so a custom method is needed to # sleep for a given interval. def sleep(self, interval): - start = time.time() - while True: - sleepTime = (start + interval) - time.time() - if sleepTime <= 0: - break - time.sleep(sleepTime) + start = time.time() + while True: + sleepTime = (start + interval) - time.time() + if sleepTime <= 0: + break + time.sleep(sleepTime) def run(self, args): - self.ignoreInterrupt() - print "Ignore CTRL+C and the like for 5 seconds (try it!)" - self.sleep(5) + self.ignoreInterrupt() + print "Ignore CTRL+C and the like for 5 seconds (try it!)" + self.sleep(5) - self.callbackOnInterrupt() + self.callbackOnInterrupt() - self.holdInterrupt() - print "Hold CTRL+C and the like for 5 seconds (try it!)" - self.sleep(5) + self.holdInterrupt() + print "Hold CTRL+C and the like for 5 seconds (try it!)" + self.sleep(5) - self.releaseInterrupt() - print "Release CTRL+C (any held signals should be released)" - self.sleep(5) + self.releaseInterrupt() + print "Release CTRL+C (any held signals should be released)" + self.sleep(5) - self.holdInterrupt() - print "Hold CTRL+C and the like for 5 seconds (try it!)" - self.sleep(5) + self.holdInterrupt() + print "Hold CTRL+C and the like for 5 seconds (try it!)" + self.sleep(5) - self.callbackOnInterrupt() - print "Release CTRL+C (any held signals should be released)" - self.sleep(5) + self.callbackOnInterrupt() + print "Release CTRL+C (any held signals should be released)" + self.sleep(5) - self.shutdownOnInterrupt() - print "Test shutdown on destroy. Press CTRL+C to shutdown & terminate" - self.communicator().waitForShutdown() + self.shutdownOnInterrupt() + print "Test shutdown on destroy. Press CTRL+C to shutdown & terminate" + self.communicator().waitForShutdown() - print "ok" + print "ok" return False app = Client() diff --git a/py/test/Ice/binding/AllTests.py b/py/test/Ice/binding/AllTests.py index 8c9bb59dbd4..6ad592646cc 100644 --- a/py/test/Ice/binding/AllTests.py +++ b/py/test/Ice/binding/AllTests.py @@ -49,14 +49,14 @@ def createTestIntfPrx(adapters): endpoints = [] test = None for p in adapters: - test = p.getTestIntf() - edpts = test.ice_getEndpoints() - endpoints.extend(edpts) + test = p.getTestIntf() + edpts = test.ice_getEndpoints() + endpoints.extend(edpts) return Test.TestIntfPrx.uncheckedCast(test.ice_endpoints(endpoints)) def deactivate(com, adapters): for p in adapters: - com.deactivateObjectAdapter(p) + com.deactivateObjectAdapter(p) def allTests(communicator): ref = "communicator:default -p 12010 -t 10000" @@ -80,10 +80,10 @@ def allTests(communicator): test(test3.ice_getConnection() == test2.ice_getConnection()) try: - test3.ice_ping() - test(False) + test3.ice_ping() + test(False) except Ice.ConnectionRefusedException: - pass + pass print "ok" @@ -100,21 +100,21 @@ def allTests(communicator): # names = ["Adapter11", "Adapter12", "Adapter13"] while len(names) > 0: - adpts = adapters[:] + adpts = adapters[:] - test1 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test2 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test3 = createTestIntfPrx(adpts) + test1 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test2 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test3 = createTestIntfPrx(adpts) - test(test1.ice_getConnection() == test2.ice_getConnection()) - test(test2.ice_getConnection() == test3.ice_getConnection()) + test(test1.ice_getConnection() == test2.ice_getConnection()) + test(test2.ice_getConnection() == test3.ice_getConnection()) - name = test1.getAdapterName() - if names.count(name) > 0: - names.remove(name) - test1.ice_getConnection().close(False) + name = test1.getAdapterName() + if names.count(name) > 0: + names.remove(name) + test1.ice_getConnection().close(False) # # Ensure that the proxy correctly caches the connection (we @@ -128,7 +128,7 @@ def allTests(communicator): i = 0 nRetry = 5 while i < nRetry and t.getAdapterName() == name: - i = i + 1 + i = i + 1 test(i == nRetry) for a in adapters: @@ -142,21 +142,21 @@ def allTests(communicator): names.append("Adapter12") names.append("Adapter13") while len(names) > 0: - adpts = adapters[:] + adpts = adapters[:] - test1 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test2 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test3 = createTestIntfPrx(adpts) + test1 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test2 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test3 = createTestIntfPrx(adpts) - test(test1.ice_getConnection() == test2.ice_getConnection()) - test(test2.ice_getConnection() == test3.ice_getConnection()) + test(test1.ice_getConnection() == test2.ice_getConnection()) + test(test2.ice_getConnection() == test3.ice_getConnection()) - name = test1.getAdapterName() - if names.count(name) > 0: - names.remove(name) - test1.ice_getConnection().close(False) + name = test1.getAdapterName() + if names.count(name) > 0: + names.remove(name) + test1.ice_getConnection().close(False) # # Deactivate an adapter and ensure that we can still @@ -183,21 +183,21 @@ def allTests(communicator): # names = ["AdapterAMI11", "AdapterAMI12", "AdapterAMI13"] while len(names) > 0: - adpts = adapters[:] + adpts = adapters[:] - test1 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test2 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test3 = createTestIntfPrx(adpts) + test1 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test2 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test3 = createTestIntfPrx(adpts) - test(test1.ice_getConnection() == test2.ice_getConnection()) - test(test2.ice_getConnection() == test3.ice_getConnection()) + test(test1.ice_getConnection() == test2.ice_getConnection()) + test(test2.ice_getConnection() == test3.ice_getConnection()) - name = getAdapterNameWithAMI(test1) - if names.count(name) > 0: - names.remove(name) - test1.ice_getConnection().close(False) + name = getAdapterNameWithAMI(test1) + if names.count(name) > 0: + names.remove(name) + test1.ice_getConnection().close(False) # # Ensure that the proxy correctly caches the connection (we @@ -211,7 +211,7 @@ def allTests(communicator): i = 0 nRetry = 5 while i < nRetry and getAdapterNameWithAMI(t) == name: - i = i + 1 + i = i + 1 test(i == nRetry) for a in adapters: @@ -225,21 +225,21 @@ def allTests(communicator): names.append("AdapterAMI12") names.append("AdapterAMI13") while len(names) > 0: - adpts = adapters[:] + adpts = adapters[:] - test1 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test2 = createTestIntfPrx(adpts) - random.shuffle(adpts) - test3 = createTestIntfPrx(adpts) + test1 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test2 = createTestIntfPrx(adpts) + random.shuffle(adpts) + test3 = createTestIntfPrx(adpts) - test(test1.ice_getConnection() == test2.ice_getConnection()) - test(test2.ice_getConnection() == test3.ice_getConnection()) + test(test1.ice_getConnection() == test2.ice_getConnection()) + test(test2.ice_getConnection() == test3.ice_getConnection()) - name = getAdapterNameWithAMI(test1) - if names.count(name) > 0: - names.remove(name) - test1.ice_getConnection().close(False) + name = getAdapterNameWithAMI(test1) + if names.count(name) > 0: + names.remove(name) + test1.ice_getConnection().close(False) # # Deactivate an adapter and ensure that we can still @@ -265,10 +265,10 @@ def allTests(communicator): names = ["Adapter21", "Adapter22", "Adapter23"] while len(names) > 0: - name = t.getAdapterName() - if names.count(name) > 0: - names.remove(name) - t.ice_getConnection().close(False) + name = t.getAdapterName() + if names.count(name) > 0: + names.remove(name) + t.ice_getConnection().close(False) t = Test.TestIntfPrx.uncheckedCast(t.ice_endpointSelection(Ice.EndpointSelectionType.Random)) test(t.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random) @@ -277,10 +277,10 @@ def allTests(communicator): names.append("Adapter22") names.append("Adapter23") while len(names) > 0: - name = t.getAdapterName() - if names.count(name) > 0: - names.remove(name) - t.ice_getConnection().close(False) + name = t.getAdapterName() + if names.count(name) > 0: + names.remove(name) + t.ice_getConnection().close(False) deactivate(com, adapters) @@ -304,24 +304,24 @@ def allTests(communicator): # i = 0 while i < nRetry and t.getAdapterName() == "Adapter31": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[0]) i = 0 while i < nRetry and t.getAdapterName() == "Adapter32": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[1]) i = 0 while i < nRetry and t.getAdapterName() == "Adapter33": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[2]) try: - t.getAdapterName() + t.getAdapterName() except Ice.ConnectionRefusedException: - pass + pass endpoints = t.ice_getEndpoints() @@ -334,19 +334,19 @@ def allTests(communicator): adapters.append(com.createObjectAdapter("Adapter36", endpoints[2].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter36": - i = i + 1 + i = i + 1 test(i == nRetry) t.ice_getConnection().close(True) adapters.append(com.createObjectAdapter("Adapter35", endpoints[1].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter35": - i = i + 1 + i = i + 1 test(i == nRetry) t.ice_getConnection().close(True) adapters.append(com.createObjectAdapter("Adapter34", endpoints[0].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter34": - i = i + 1 + i = i + 1 test(i == nRetry) deactivate(com, adapters) @@ -369,10 +369,10 @@ def allTests(communicator): test3 = Test.TestIntfPrx.uncheckedCast(test1) try: - test(test3.ice_getConnection() == test1.ice_getConnection()) - test(False) + test(test3.ice_getConnection() == test1.ice_getConnection()) + test(False) except Ice.ConnectionRefusedException: - pass + pass print "ok" @@ -388,18 +388,18 @@ def allTests(communicator): names = ["Adapter51", "Adapter52", "Adapter53"] while len(names) > 0: - name = t.getAdapterName() - if names.count(name) > 0: - names.remove(name) + name = t.getAdapterName() + if names.count(name) > 0: + names.remove(name) com.deactivateObjectAdapter(adapters[0]) names.append("Adapter52") names.append("Adapter53") while len(names) > 0: - name = t.getAdapterName() - if names.count(name) > 0: - names.remove(name) + name = t.getAdapterName() + if names.count(name) > 0: + names.remove(name) com.deactivateObjectAdapter(adapters[2]) @@ -421,18 +421,18 @@ def allTests(communicator): names = ["AdapterAMI51", "AdapterAMI52", "AdapterAMI53"] while len(names) > 0: - name = getAdapterNameWithAMI(t) - if names.count(name) > 0: - names.remove(name) + name = getAdapterNameWithAMI(t) + if names.count(name) > 0: + names.remove(name) com.deactivateObjectAdapter(adapters[0]) names.append("AdapterAMI52") names.append("AdapterAMI53") while len(names) > 0: - name = getAdapterNameWithAMI(t) - if names.count(name) > 0: - names.remove(name) + name = getAdapterNameWithAMI(t) + if names.count(name) > 0: + names.remove(name) com.deactivateObjectAdapter(adapters[2]) @@ -462,24 +462,24 @@ def allTests(communicator): # i = 0 while i < nRetry and t.getAdapterName() == "Adapter61": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[0]) i = 0 while i < nRetry and t.getAdapterName() == "Adapter62": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[1]) i = 0 while i < nRetry and t.getAdapterName() == "Adapter63": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[2]) try: - t.getAdapterName() + t.getAdapterName() except Ice.ConnectionRefusedException: - pass + pass endpoints = t.ice_getEndpoints() @@ -492,17 +492,17 @@ def allTests(communicator): adapters.append(com.createObjectAdapter("Adapter66", endpoints[2].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter66": - i = i + 1 + i = i + 1 test(i == nRetry) adapters.append(com.createObjectAdapter("Adapter65", endpoints[1].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter65": - i = i + 1 + i = i + 1 test(i == nRetry) adapters.append(com.createObjectAdapter("Adapter64", endpoints[0].toString())) i = 0 while i < nRetry and t.getAdapterName() == "Adapter64": - i = i + 1 + i = i + 1 test(i == nRetry) deactivate(com, adapters) @@ -529,24 +529,24 @@ def allTests(communicator): # i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI61": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[0]) i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI62": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[1]) i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI63": - i = i + 1 + i = i + 1 test(i == nRetry) com.deactivateObjectAdapter(adapters[2]) try: - t.getAdapterName() + t.getAdapterName() except Ice.ConnectionRefusedException: - pass + pass endpoints = t.ice_getEndpoints() @@ -559,17 +559,17 @@ def allTests(communicator): adapters.append(com.createObjectAdapter("AdapterAMI66", endpoints[2].toString())) i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI66": - i = i + 1 + i = i + 1 test(i == nRetry) adapters.append(com.createObjectAdapter("AdapterAMI65", endpoints[1].toString())) i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI65": - i = i + 1 + i = i + 1 test(i == nRetry) adapters.append(com.createObjectAdapter("AdapterAMI64", endpoints[0].toString())) i = 0 while i < nRetry and getAdapterNameWithAMI(t) == "AdapterAMI64": - i = i + 1 + i = i + 1 test(i == nRetry) deactivate(com, adapters) @@ -588,53 +588,53 @@ def allTests(communicator): testUDP = Test.TestIntfPrx.uncheckedCast(t.ice_datagram()) test(t.ice_getConnection() != testUDP.ice_getConnection()) try: - testUDP.getAdapterName() + testUDP.getAdapterName() except Ice.TwowayOnlyException: - pass + pass print "ok" if(len(communicator.getProperties().getProperty("Ice.Plugin.IceSSL")) > 0): - print "testing unsecure vs. secure endpoints...", - - adapters = [] - adapters.append(com.createObjectAdapter("Adapter81", "ssl")) - adapters.append(com.createObjectAdapter("Adapter82", "tcp")) - - t = createTestIntfPrx(adapters) - for i in range(0, 5): - test(t.getAdapterName() == "Adapter82") - t.ice_getConnection().close(False) - - testSecure = Test.TestIntfPrx.uncheckedCast(t.ice_secure(True)) - test(testSecure.ice_isSecure()) + print "testing unsecure vs. secure endpoints...", + + adapters = [] + adapters.append(com.createObjectAdapter("Adapter81", "ssl")) + adapters.append(com.createObjectAdapter("Adapter82", "tcp")) + + t = createTestIntfPrx(adapters) + for i in range(0, 5): + test(t.getAdapterName() == "Adapter82") + t.ice_getConnection().close(False) + + testSecure = Test.TestIntfPrx.uncheckedCast(t.ice_secure(True)) + test(testSecure.ice_isSecure()) testSecure = Test.TestIntfPrx.uncheckedCast(t.ice_secure(False)) test(not testSecure.ice_isSecure()) - testSecure = Test.TestIntfPrx.uncheckedCast(t.ice_secure(True)) - test(testSecure.ice_isSecure()) - test(t.ice_getConnection() != testSecure.ice_getConnection()) + testSecure = Test.TestIntfPrx.uncheckedCast(t.ice_secure(True)) + test(testSecure.ice_isSecure()) + test(t.ice_getConnection() != testSecure.ice_getConnection()) - com.deactivateObjectAdapter(adapters[1]) + com.deactivateObjectAdapter(adapters[1]) - for i in range(0, 5): - test(t.getAdapterName() == "Adapter81") - t.ice_getConnection().close(False) + for i in range(0, 5): + test(t.getAdapterName() == "Adapter81") + t.ice_getConnection().close(False) - com.createObjectAdapter("Adapter83", (t.ice_getEndpoints()[1]).toString()) # Reactive tcp OA. + com.createObjectAdapter("Adapter83", (t.ice_getEndpoints()[1]).toString()) # Reactive tcp OA. - for i in range(0, 5): - test(t.getAdapterName() == "Adapter83") - t.ice_getConnection().close(False) + for i in range(0, 5): + test(t.getAdapterName() == "Adapter83") + t.ice_getConnection().close(False) - com.deactivateObjectAdapter(adapters[0]) - try: - testSecure.ice_ping() - test(False) - except Ice.ConnectionRefusedException: - pass + com.deactivateObjectAdapter(adapters[0]) + try: + testSecure.ice_ping() + test(False) + except Ice.ConnectionRefusedException: + pass - deactivate(com, adapters) + deactivate(com, adapters) - print "ok" + print "ok" com.shutdown() diff --git a/py/test/Ice/binding/TestI.py b/py/test/Ice/binding/TestI.py index f121d01374a..d74c8285474 100644 --- a/py/test/Ice/binding/TestI.py +++ b/py/test/Ice/binding/TestI.py @@ -12,11 +12,11 @@ import Ice, Test class RemoteCommunicatorI(Test.RemoteCommunicator): def createObjectAdapter(self, name, endpoints, current=None): - com = current.adapter.getCommunicator() + com = current.adapter.getCommunicator() if com.getProperties().getPropertyAsIntWithDefault("Ice.ThreadPerConnection", 0) == 0: com.getProperties().setProperty("Ice.OA." + name + ".ThreadPool.Size", "1") - adapter = com.createObjectAdapterWithEndpoints(name, endpoints) - return Test.RemoteObjectAdapterPrx.uncheckedCast(current.adapter.addWithUUID(RemoteObjectAdapterI(adapter))) + adapter = com.createObjectAdapterWithEndpoints(name, endpoints) + return Test.RemoteObjectAdapterPrx.uncheckedCast(current.adapter.addWithUUID(RemoteObjectAdapterI(adapter))) def deactivateObjectAdapter(self, adapter, current=None): adapter.deactivate() @@ -26,19 +26,19 @@ class RemoteCommunicatorI(Test.RemoteCommunicator): class RemoteObjectAdapterI(Test.RemoteObjectAdapter): def __init__(self, adapter): - self._adapter = adapter - self._testIntf = Test.TestIntfPrx.uncheckedCast(self._adapter.add(TestI(), adapter.getCommunicator().stringToIdentity("test"))) - self._adapter.activate() + self._adapter = adapter + self._testIntf = Test.TestIntfPrx.uncheckedCast(self._adapter.add(TestI(), adapter.getCommunicator().stringToIdentity("test"))) + self._adapter.activate() def getTestIntf(self, current=None): - return self._testIntf + return self._testIntf def deactivate(self, current=None): - try: - self._adapter.destroy() - except Ice.ObjectAdapterDeactivatedException: - pass + try: + self._adapter.destroy() + except Ice.ObjectAdapterDeactivatedException: + pass class TestI(Test.TestIntf): def getAdapterName(self, current=None): - return current.adapter.getName() + return current.adapter.getName() diff --git a/py/test/Ice/custom/AllTests.py b/py/test/Ice/custom/AllTests.py index 651fb1fcf45..ea36daaad03 100644 --- a/py/test/Ice/custom/AllTests.py +++ b/py/test/Ice/custom/AllTests.py @@ -38,22 +38,22 @@ def allTests(communicator): test(isinstance(r, tuple)) test(isinstance(b2, list)) for i in range(0, len(byteList)): - test(r[i] == byteList[i]) - test(b2[i] == byteList[i]) + test(r[i] == byteList[i]) + test(b2[i] == byteList[i]) (r, b2) = custom.opByteList1(byteList) test(isinstance(r, list)) test(isinstance(b2, list)) for i in range(0, len(byteList)): - test(r[i] == byteList[i]) - test(b2[i] == byteList[i]) + test(r[i] == byteList[i]) + test(b2[i] == byteList[i]) (r, b2) = custom.opByteList2(byteList) test(isinstance(r, str)) test(isinstance(b2, tuple)) test(r == byteString) for i in range(0, len(byteList)): - test(b2[i] == byteList[i]) + test(b2[i] == byteList[i]) (r, b2) = custom.opStringList1(stringList) test(isinstance(r, list)) @@ -65,15 +65,15 @@ def allTests(communicator): test(isinstance(r, tuple)) test(isinstance(b2, tuple)) for i in range(0, len(stringList)): - test(r[i] == stringList[i]) - test(b2[i] == stringList[i]) + test(r[i] == stringList[i]) + test(b2[i] == stringList[i]) (r, b2) = custom.opStringTuple1(stringList) test(isinstance(r, tuple)) test(isinstance(b2, tuple)) for i in range(0, len(stringList)): - test(r[i] == stringList[i]) - test(b2[i] == stringList[i]) + test(r[i] == stringList[i]) + test(b2[i] == stringList[i]) (r, b2) = custom.opStringTuple2(stringList) test(isinstance(r, list)) diff --git a/py/test/Ice/custom/Server.py b/py/test/Ice/custom/Server.py index ce8fd72c656..b995b0b566a 100644 --- a/py/test/Ice/custom/Server.py +++ b/py/test/Ice/custom/Server.py @@ -33,56 +33,56 @@ class CustomI(Test.Custom): self._adapter = adapter def opByteString1(self, b1, current=None): - test(isinstance(b1, str)) - return (b1, b1) + test(isinstance(b1, str)) + return (b1, b1) def opByteString2(self, b1, current=None): - test(isinstance(b1, list)) - return (b1, b1) + test(isinstance(b1, list)) + return (b1, b1) def opByteList1(self, b1, current=None): - test(isinstance(b1, list)) - return (b1, b1) + test(isinstance(b1, list)) + return (b1, b1) def opByteList2(self, b1, current=None): - test(isinstance(b1, tuple)) - return (b1, b1) + test(isinstance(b1, tuple)) + return (b1, b1) def opStringList1(self, s1, current=None): - test(isinstance(s1, list)) - return (s1, s1) + test(isinstance(s1, list)) + return (s1, s1) def opStringList2(self, s1, current=None): - test(isinstance(s1, tuple)) - return (s1, s1) + test(isinstance(s1, tuple)) + return (s1, s1) def opStringTuple1(self, s1, current=None): - test(isinstance(s1, tuple)) - return (s1, s1) + test(isinstance(s1, tuple)) + return (s1, s1) def opStringTuple2(self, s1, current=None): - test(isinstance(s1, list)) - return (s1, s1) + test(isinstance(s1, list)) + return (s1, s1) def sendS(self, val, current=None): - test(isinstance(val.b1, str)) - test(isinstance(val.b2, list)) - test(isinstance(val.b3, str)) - test(isinstance(val.b4, list)) - test(isinstance(val.s1, list)) - test(isinstance(val.s2, tuple)) - test(isinstance(val.s3, tuple)) - test(isinstance(val.s4, list)) + test(isinstance(val.b1, str)) + test(isinstance(val.b2, list)) + test(isinstance(val.b3, str)) + test(isinstance(val.b4, list)) + test(isinstance(val.s1, list)) + test(isinstance(val.s2, tuple)) + test(isinstance(val.s3, tuple)) + test(isinstance(val.s4, list)) def sendC(self, val, current=None): - test(isinstance(val.b1, str)) - test(isinstance(val.b2, list)) - test(isinstance(val.b3, str)) - test(isinstance(val.b4, list)) - test(isinstance(val.s1, list)) - test(isinstance(val.s2, tuple)) - test(isinstance(val.s3, tuple)) - test(isinstance(val.s4, list)) + test(isinstance(val.b1, str)) + test(isinstance(val.b2, list)) + test(isinstance(val.b3, str)) + test(isinstance(val.b4, list)) + test(isinstance(val.s1, list)) + test(isinstance(val.s2, tuple)) + test(isinstance(val.s3, tuple)) + test(isinstance(val.s4, list)) def shutdown(self, current=None): self._adapter.getCommunicator().shutdown() diff --git a/py/test/Ice/custom/Test.ice b/py/test/Ice/custom/Test.ice index c31414f188b..a3fbf3e700a 100644 --- a/py/test/Ice/custom/Test.ice +++ b/py/test/Ice/custom/Test.ice @@ -20,50 +20,50 @@ module Test struct S { - ByteString b1; - ["python:seq:list"] ByteString b2; - ["python:seq:default"] ByteList b3; - ByteList b4; - StringList s1; - ["python:seq:tuple"] StringList s2; - StringTuple s3; - ["python:seq:default"] StringTuple s4; + ByteString b1; + ["python:seq:list"] ByteString b2; + ["python:seq:default"] ByteList b3; + ByteList b4; + StringList s1; + ["python:seq:tuple"] StringList s2; + StringTuple s3; + ["python:seq:default"] StringTuple s4; }; class C { - ByteString b1; - ["python:seq:list"] ByteString b2; - ["python:seq:default"] ByteList b3; - ByteList b4; - StringList s1; - ["python:seq:tuple"] StringList s2; - StringTuple s3; - ["python:seq:default"] StringTuple s4; + ByteString b1; + ["python:seq:list"] ByteString b2; + ["python:seq:default"] ByteList b3; + ByteList b4; + StringList s1; + ["python:seq:tuple"] StringList s2; + StringTuple s3; + ["python:seq:default"] StringTuple s4; }; interface Custom { - ByteString opByteString1(ByteString b1, out ByteString b2); - ["python:seq:tuple"] ByteString opByteString2(["python:seq:list"] ByteString b1, - out ["python:seq:list"] ByteString b2); + ByteString opByteString1(ByteString b1, out ByteString b2); + ["python:seq:tuple"] ByteString opByteString2(["python:seq:list"] ByteString b1, + out ["python:seq:list"] ByteString b2); - ByteList opByteList1(ByteList b1, out ByteList b2); - ["python:seq:default"] ByteList opByteList2(["python:seq:tuple"] ByteList b1, - out ["python:seq:tuple"] ByteList b2); + ByteList opByteList1(ByteList b1, out ByteList b2); + ["python:seq:default"] ByteList opByteList2(["python:seq:tuple"] ByteList b1, + out ["python:seq:tuple"] ByteList b2); - StringList opStringList1(StringList s1, out StringList s2); - ["python:seq:tuple"] StringList opStringList2(["python:seq:tuple"] StringList s1, - out ["python:seq:tuple"] StringList s2); + StringList opStringList1(StringList s1, out StringList s2); + ["python:seq:tuple"] StringList opStringList2(["python:seq:tuple"] StringList s1, + out ["python:seq:tuple"] StringList s2); - StringTuple opStringTuple1(StringTuple s1, out StringTuple s2); - ["python:seq:list"] StringTuple opStringTuple2(["python:seq:list"] StringTuple s1, - out ["python:seq:default"] StringTuple s2); + StringTuple opStringTuple1(StringTuple s1, out StringTuple s2); + ["python:seq:list"] StringTuple opStringTuple2(["python:seq:list"] StringTuple s1, + out ["python:seq:default"] StringTuple s2); - void sendS(S val); - void sendC(C val); + void sendS(S val); + void sendC(C val); - void shutdown(); + void shutdown(); }; }; diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py index c3ae7cd7487..d4947952ab5 100644 --- a/py/test/Ice/exceptions/AllTests.py +++ b/py/test/Ice/exceptions/AllTests.py @@ -295,14 +295,14 @@ def allTests(communicator): adapter.add(obj, communicator.stringToIdentity("x")) try: adapter.add(obj, communicator.stringToIdentity("x")) - test(false) + test(false) except Ice.AlreadyRegisteredException: pass adapter.remove(communicator.stringToIdentity("x")) try: adapter.remove(communicator.stringToIdentity("x")) - test(false) + test(false) except Ice.NotRegisteredException: pass @@ -316,7 +316,7 @@ def allTests(communicator): adapter.addServantLocator(loc, "x") try: adapter.addServantLocator(loc, "x") - test(false) + test(false) except Ice.AlreadyRegisteredException: pass @@ -328,7 +328,7 @@ def allTests(communicator): communicator.addObjectFactory(of, "x") try: communicator.addObjectFactory(of, "x") - test(false) + test(false) except Ice.AlreadyRegisteredException: pass print "ok" diff --git a/py/test/Ice/exceptions/Test.ice b/py/test/Ice/exceptions/Test.ice index 0844993df14..296d76f7005 100644 --- a/py/test/Ice/exceptions/Test.ice +++ b/py/test/Ice/exceptions/Test.ice @@ -43,7 +43,7 @@ module Mod { exception A extends ::Test::A { - int a2Mem; + int a2Mem; }; }; diff --git a/py/test/Ice/exceptions/TestAMD.ice b/py/test/Ice/exceptions/TestAMD.ice index a3efb41c18e..9c0eb3ad93b 100644 --- a/py/test/Ice/exceptions/TestAMD.ice +++ b/py/test/Ice/exceptions/TestAMD.ice @@ -39,7 +39,7 @@ module Mod { exception A extends ::Test::A { - int a2Mem; + int a2Mem; }; }; diff --git a/py/test/Ice/facets/AllTests.py b/py/test/Ice/facets/AllTests.py index 8ba5e6fd3a9..3a2ed91360e 100644 --- a/py/test/Ice/facets/AllTests.py +++ b/py/test/Ice/facets/AllTests.py @@ -26,13 +26,13 @@ def allTests(communicator): adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD") try: adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD") - test(false) + test(false) except Ice.AlreadyRegisteredException: pass adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD") try: adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD") - test(false) + test(false) except Ice.NotRegisteredException: pass print "ok" @@ -52,7 +52,7 @@ def allTests(communicator): test(fm["f2"] == obj2) try: adapter.removeAllFacets(communicator.stringToIdentity("id1")) - test(false) + test(false) except Ice.NotRegisteredException: pass fm = adapter.removeAllFacets(communicator.stringToIdentity("id2")) diff --git a/py/test/Ice/faultTolerance/run.py b/py/test/Ice/faultTolerance/run.py index c309229ad5a..58712327666 100755 --- a/py/test/Ice/faultTolerance/run.py +++ b/py/test/Ice/faultTolerance/run.py @@ -37,7 +37,7 @@ for i in range(0, num): sys.stdout.flush() command = "python " + server + TestUtil.serverOptions + " %d" % (base + i) if TestUtil.debug: - print "(" + command + ")", + print "(" + command + ")", serverPipe = os.popen(command + " 2>&1") TestUtil.getServerPid(serverPipe) TestUtil.getAdapterReady(serverPipe) diff --git a/py/test/Ice/location/AllTests.py b/py/test/Ice/location/AllTests.py index 37b7e9ab826..92afa97cf22 100644 --- a/py/test/Ice/location/AllTests.py +++ b/py/test/Ice/location/AllTests.py @@ -40,7 +40,7 @@ def allTests(communicator, ref): communicator.setDefaultLocator(locator); base = communicator.stringToProxy("test @ TestAdapter"); test(Ice.proxyIdentityEqual(base.ice_getLocator(), communicator.getDefaultLocator())); - + # # We also test ice_router/ice_getRouter (perhaps we should add a # test/Ice/router test?) @@ -82,87 +82,87 @@ def allTests(communicator, ref): obj.shutdown() manager.startServer() try: - obj2 = Test.TestIntfPrx.checkedCast(base2) - obj2.ice_ping() + obj2 = Test.TestIntfPrx.checkedCast(base2) + obj2.ice_ping() except Ice.LocalException: - test(False) + test(False) print "ok" print "testing identity indirect proxy...", obj.shutdown() manager.startServer() try: - obj3 = Test.TestIntfPrx.checkedCast(base3) - obj3.ice_ping() + obj3 = Test.TestIntfPrx.checkedCast(base3) + obj3.ice_ping() except Ice.LocalException: - test(False) + test(False) try: - obj2 = Test.TestIntfPrx.checkedCast(base2) - obj2.ice_ping() + obj2 = Test.TestIntfPrx.checkedCast(base2) + obj2.ice_ping() except Ice.LocalException: - test(False) + test(False) obj.shutdown() manager.startServer() try: - obj2 = Test.TestIntfPrx.checkedCast(base2) - obj2.ice_ping() + obj2 = Test.TestIntfPrx.checkedCast(base2) + obj2.ice_ping() except Ice.LocalException: - test(False) + test(False) try: - obj3 = Test.TestIntfPrx.checkedCast(base3) - obj3.ice_ping() + obj3 = Test.TestIntfPrx.checkedCast(base3) + obj3.ice_ping() except Ice.LocalException: - test(False) + test(False) obj.shutdown() manager.startServer() try: - obj2 = Test.TestIntfPrx.checkedCast(base2) - obj2.ice_ping() + obj2 = Test.TestIntfPrx.checkedCast(base2) + obj2.ice_ping() except Ice.LocalException: - test(False) + test(False) obj.shutdown() manager.startServer() try: - obj3 = Test.TestIntfPrx.checkedCast(base3) - obj3.ice_ping() + obj3 = Test.TestIntfPrx.checkedCast(base3) + obj3.ice_ping() except Ice.LocalException: - test(False) + test(False) obj.shutdown() manager.startServer() try: - obj2 = Test.TestIntfPrx.checkedCast(base2) - obj2.ice_ping() + obj2 = Test.TestIntfPrx.checkedCast(base2) + obj2.ice_ping() except Ice.LocalException: - test(False) + test(False) obj.shutdown() manager.startServer() try: - obj5 = Test.TestIntfPrx.checkedCast(base5) - obj5.ice_ping() + obj5 = Test.TestIntfPrx.checkedCast(base5) + obj5.ice_ping() except Ice.LocalException: - test(False) + test(False) print "ok" print "testing reference with unknown identity...", try: - base = communicator.stringToProxy("unknown/unknown") - base.ice_ping() - test(False) + base = communicator.stringToProxy("unknown/unknown") + base.ice_ping() + test(False) except Ice.NotRegisteredException, ex: - test(ex.kindOfObject == "object") - test(ex.id == "unknown/unknown") + test(ex.kindOfObject == "object") + test(ex.id == "unknown/unknown") print "ok" print "testing reference with unknown adapter...", try: - base = communicator.stringToProxy("test @ TestAdapterUnknown") - base.ice_ping() - test(False) + base = communicator.stringToProxy("test @ TestAdapterUnknown") + base.ice_ping() + test(False) except Ice.NotRegisteredException, ex: - test(ex.kindOfObject == "object adapter") - test(ex.id == "TestAdapterUnknown") + test(ex.kindOfObject == "object adapter") + test(ex.id == "TestAdapterUnknown") print "ok" print "testing object reference from server...", @@ -192,20 +192,20 @@ def allTests(communicator, ref): print "testing whether server is gone...", try: - obj2.ice_ping() - test(False) + obj2.ice_ping() + test(False) except Ice.LocalException: - pass + pass try: - obj3.ice_ping() - test(False) + obj3.ice_ping() + test(False) except Ice.LocalException: - pass + pass try: - obj5.ice_ping() - test(False) + obj5.ice_ping() + test(False) except Ice.LocalException: - pass + pass print "ok" # diff --git a/py/test/Ice/location/Server.py b/py/test/Ice/location/Server.py index da62de3033a..c7e839fe9ef 100644 --- a/py/test/Ice/location/Server.py +++ b/py/test/Ice/location/Server.py @@ -42,14 +42,14 @@ class ServerLocatorRegistry(Ice.LocatorRegistry): def setAdapterDirectProxy_async(self, cb, adapter, obj, current=None): self._adapters[adapter] = obj - cb.ice_response() + cb.ice_response() def setReplicatedAdapterDirectProxy_async(self, cb, adapter, replica, obj, current=None): self._adapters[adapter] = obj - cb.ice_response() + cb.ice_response() def setServerProcessProxy_async(self, id, proxy, current=None): - cb.ice_response() + cb.ice_response() def addObject(self, obj, current=None): self._objects[obj.ice_getIdentity()] = obj @@ -82,7 +82,7 @@ class ServerLocator(Ice.Locator): class ServerManagerI(Test.ServerManager): def __init__(self, adapter, registry, initData): self._adapter = adapter - self._registry = registry + self._registry = registry self._communicators = [] self._initData = initData self._initData.properties.setProperty("Ice.OA.TestAdapter.Endpoints", "default") @@ -111,8 +111,8 @@ class ServerManagerI(Test.ServerManager): adapter2.setLocator(Ice.LocatorPrx.uncheckedCast(locator)) object = TestI(adapter, adapter2, self._registry) - self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test"))) - self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test2"))) + self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test"))) + self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test2"))) adapter.activate() adapter2.activate() @@ -140,11 +140,11 @@ class TestI(Test.TestIntf): return Test.HelloPrx.uncheckedCast(self._adapter1.createProxy(communicator.stringToIdentity("hello"))) def migrateHello(self, current=None): - id = communicator.stringToIdentity("hello") - try: - self._registry.addObject(self._adapter2.add(self._adapter1.remove(id), id)) - except Ice.NotRegisteredException: - self._registry.addObject(self._adapter1.add(self._adapter2.remove(id), id)) + id = communicator.stringToIdentity("hello") + try: + self._registry.addObject(self._adapter2.add(self._adapter1.remove(id), id)) + except Ice.NotRegisteredException: + self._registry.addObject(self._adapter1.add(self._adapter2.remove(id), id)) def run(args, communicator, initData): # diff --git a/py/test/Ice/objects/AllTests.py b/py/test/Ice/objects/AllTests.py index 73ca803f4fe..f98620ce6a5 100644 --- a/py/test/Ice/objects/AllTests.py +++ b/py/test/Ice/objects/AllTests.py @@ -133,24 +133,24 @@ def allTests(communicator, collocated): print "ok" if not collocated: - print "testing UnexpectedObjectException... " - ref = "uoet:default -p 12010 -t 10000" - base = communicator.stringToProxy(ref) - test(base) - uoet = Test.UnexpectedObjectExceptionTestPrx.uncheckedCast(base) - test(uoet) - try: - uoet.op() - test(False) - except Ice.UnexpectedObjectException, ex: - test(ex.type == "::Test::AlsoEmpty") - test(ex.expectedType == "::Test::Empty") - except Ice.Exception, ex: - print ex - test(False) - except: - print sys.exc_info() - test(False) - print "ok" + print "testing UnexpectedObjectException... " + ref = "uoet:default -p 12010 -t 10000" + base = communicator.stringToProxy(ref) + test(base) + uoet = Test.UnexpectedObjectExceptionTestPrx.uncheckedCast(base) + test(uoet) + try: + uoet.op() + test(False) + except Ice.UnexpectedObjectException, ex: + test(ex.type == "::Test::AlsoEmpty") + test(ex.expectedType == "::Test::Empty") + except Ice.Exception, ex: + print ex + test(False) + except: + print sys.exc_info() + test(False) + print "ok" return initial diff --git a/py/test/Ice/operations/ServerAMD.py b/py/test/Ice/operations/ServerAMD.py index 32609fe07f3..efedfc29c3a 100644 --- a/py/test/Ice/operations/ServerAMD.py +++ b/py/test/Ice/operations/ServerAMD.py @@ -97,7 +97,7 @@ class MyDerivedClassI(Test.MyDerivedClass): cb.ice_response(p2, p1) def opByteS_async(self, cb, p1, p2, current=None): - # By default sequence<byte> maps to a string. + # By default sequence<byte> maps to a string. p3 = map(ord, p1) p3.reverse() r = map(ord, p1) @@ -219,14 +219,14 @@ class MyDerivedClassI(Test.MyDerivedClass): class TestCheckedCastI(Test.TestCheckedCast): def __init__(self): - self.ctx = None + self.ctx = None def getContext(self, current): - return self.ctx; + return self.ctx; def ice_isA(self, s, current): - self.ctx = current.ctx - return Test.TestCheckedCast.ice_isA(self, s, current) + self.ctx = current.ctx + return Test.TestCheckedCast.ice_isA(self, s, current) def run(args, communicator): communicator.getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000:udp") diff --git a/py/test/Ice/operations/Test.ice b/py/test/Ice/operations/Test.ice index 9c5e2b5d905..625066059a9 100644 --- a/py/test/Ice/operations/Test.ice +++ b/py/test/Ice/operations/Test.ice @@ -73,75 +73,75 @@ dictionary<string, MyEnum> StringMyEnumD; void opVoid(); byte opByte(byte p1, byte p2, - out byte p3); + out byte p3); bool opBool(bool p1, bool p2, - out bool p3); + out bool p3); long opShortIntLong(short p1, int p2, long p3, - out short p4, out int p5, out long p6); + out short p4, out int p5, out long p6); double opFloatDouble(float p1, double p2, - out float p3, out double p4); + out float p3, out double p4); string opString(string p1, string p2, - out string p3); + out string p3); MyEnum opMyEnum(MyEnum p1, out MyEnum p2); MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3); Structure opStruct(Structure p1, Structure p2, - out Structure p3); + out Structure p3); ByteS opByteS(ByteS p1, ByteS p2, - out ByteS p3); + out ByteS p3); BoolS opBoolS(BoolS p1, BoolS p2, - out BoolS p3); + out BoolS p3); LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3, - out ::Test::ShortS p4, out IntS p5, out LongS p6); + out ::Test::ShortS p4, out IntS p5, out LongS p6); DoubleS opFloatDoubleS(FloatS p1, DoubleS p2, - out FloatS p3, out DoubleS p4); + out FloatS p3, out DoubleS p4); StringS opStringS(StringS p1, StringS p2, - out StringS p3); + out StringS p3); ByteSS opByteSS(ByteSS p1, ByteSS p2, - out ByteSS p3); + out ByteSS p3); BoolSS opBoolSS(BoolSS p1, BoolSS p2, - out BoolSS p3); + out BoolSS p3); LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3, - out ShortSS p4, out IntSS p5, out LongSS p6); + out ShortSS p4, out IntSS p5, out LongSS p6); DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2, - out FloatSS p3, out DoubleSS p4); + out FloatSS p3, out DoubleSS p4); StringSS opStringSS(StringSS p1, StringSS p2, - out StringSS p3); + out StringSS p3); StringSSS opStringSSS(StringSSS p1, StringSSS p2, - out StringSSS p3); + out StringSSS p3); ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2, - out ByteBoolD p3); + out ByteBoolD p3); ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2, - out ShortIntD p3); + out ShortIntD p3); LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2, - out LongFloatD p3); + out LongFloatD p3); StringStringD opStringStringD(StringStringD p1, StringStringD p2, - out StringStringD p3); + out StringStringD p3); StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2, - out StringMyEnumD p3); + out StringMyEnumD p3); IntS opIntS(IntS s); diff --git a/py/test/Ice/operations/TestAMD.ice b/py/test/Ice/operations/TestAMD.ice index 1cd8bc7ec0b..7d1b34a292b 100644 --- a/py/test/Ice/operations/TestAMD.ice +++ b/py/test/Ice/operations/TestAMD.ice @@ -71,75 +71,75 @@ dictionary<string, MyEnum> StringMyEnumD; void opVoid(); byte opByte(byte p1, byte p2, - out byte p3); + out byte p3); bool opBool(bool p1, bool p2, - out bool p3); + out bool p3); long opShortIntLong(short p1, int p2, long p3, - out short p4, out int p5, out long p6); + out short p4, out int p5, out long p6); double opFloatDouble(float p1, double p2, - out float p3, out double p4); + out float p3, out double p4); string opString(string p1, string p2, - out string p3); + out string p3); MyEnum opMyEnum(MyEnum p1, out MyEnum p2); MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3); Structure opStruct(Structure p1, Structure p2, - out Structure p3); + out Structure p3); ByteS opByteS(ByteS p1, ByteS p2, - out ByteS p3); + out ByteS p3); BoolS opBoolS(BoolS p1, BoolS p2, - out BoolS p3); + out BoolS p3); LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3, - out ::Test::ShortS p4, out IntS p5, out LongS p6); + out ::Test::ShortS p4, out IntS p5, out LongS p6); DoubleS opFloatDoubleS(FloatS p1, DoubleS p2, - out FloatS p3, out DoubleS p4); + out FloatS p3, out DoubleS p4); StringS opStringS(StringS p1, StringS p2, - out StringS p3); + out StringS p3); ByteSS opByteSS(ByteSS p1, ByteSS p2, - out ByteSS p3); + out ByteSS p3); BoolSS opBoolSS(BoolSS p1, BoolSS p2, - out BoolSS p3); + out BoolSS p3); LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3, - out ShortSS p4, out IntSS p5, out LongSS p6); + out ShortSS p4, out IntSS p5, out LongSS p6); DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2, - out FloatSS p3, out DoubleSS p4); + out FloatSS p3, out DoubleSS p4); StringSS opStringSS(StringSS p1, StringSS p2, - out StringSS p3); + out StringSS p3); StringSSS opStringSSS(StringSSS p1, StringSSS p2, - out StringSSS p3); + out StringSSS p3); ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2, - out ByteBoolD p3); + out ByteBoolD p3); ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2, - out ShortIntD p3); + out ShortIntD p3); LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2, - out LongFloatD p3); + out LongFloatD p3); StringStringD opStringStringD(StringStringD p1, StringStringD p2, - out StringStringD p3); + out StringStringD p3); StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2, - out StringMyEnumD p3); + out StringMyEnumD p3); IntS opIntS(IntS s); diff --git a/py/test/Ice/operations/TestI.py b/py/test/Ice/operations/TestI.py index 5c1a43b42b6..b7462097a14 100644 --- a/py/test/Ice/operations/TestI.py +++ b/py/test/Ice/operations/TestI.py @@ -48,7 +48,7 @@ class MyDerivedClassI(Test.MyDerivedClass): return (p2, p1) def opByteS(self, p1, p2, current=None): - # By default sequence<byte> maps to a string. + # By default sequence<byte> maps to a string. p3 = map(ord, p1) p3.reverse() r = map(ord, p1) @@ -170,11 +170,11 @@ class MyDerivedClassI(Test.MyDerivedClass): class TestCheckedCastI(Test.TestCheckedCast): def __init__(self): - self.ctx = None + self.ctx = None def getContext(self, current): - return self.ctx; + return self.ctx; def ice_isA(self, s, current): - self.ctx = current.ctx - return Test.TestCheckedCast.ice_isA(self, s, current) + self.ctx = current.ctx + return Test.TestCheckedCast.ice_isA(self, s, current) diff --git a/py/test/Ice/operations/Twoways.py b/py/test/Ice/operations/Twoways.py index 23ebae4032a..e18d79e8975 100644 --- a/py/test/Ice/operations/Twoways.py +++ b/py/test/Ice/operations/Twoways.py @@ -607,7 +607,7 @@ def twoways(communicator, p): ic = Ice.initialize(data=initData) ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'} - + p = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010 -t 10000")) ic.getImplicitContext().setContext(ctx) diff --git a/py/test/Ice/operations/TwowaysAMI.py b/py/test/Ice/operations/TwowaysAMI.py index 6f1f9b2a24e..3e7ab4535da 100644 --- a/py/test/Ice/operations/TwowaysAMI.py +++ b/py/test/Ice/operations/TwowaysAMI.py @@ -148,21 +148,21 @@ class AMI_MyClass_opMyEnumI(CallbackBase): class AMI_MyClass_opMyClassI(CallbackBase): def __init__(self, communicator): CallbackBase.__init__(self) - self._communicator = communicator + self._communicator = communicator def ice_response(self, r, c1, c2): test(c1.ice_getIdentity() == self._communicator.stringToIdentity("test")) test(c2.ice_getIdentity() == self._communicator.stringToIdentity("noSuchIdentity")) test(r.ice_getIdentity() == self._communicator.stringToIdentity("test")) - # We can't do the callbacks below in thread per connection mode. - if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0: - r.opVoid() - c1.opVoid() - try: - c2.opVoid() - test(False) - except Ice.ObjectNotExistException: - pass + # We can't do the callbacks below in thread per connection mode. + if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0: + r.opVoid() + c1.opVoid() + try: + c2.opVoid() + test(False) + except Ice.ObjectNotExistException: + pass self.called() def ice_exception(self, ex): @@ -180,9 +180,9 @@ class AMI_MyClass_opStructI(CallbackBase): test(rso.s.s == "def") test(so.e == Test.MyEnum.enum3) test(so.s.s == "a new string") - # We can't do the callbacks below in thread per connection mode. - if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0: - so.p.opVoid() + # We can't do the callbacks below in thread per connection mode. + if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0: + so.p.opVoid() self.called() def ice_exception(self, ex): @@ -527,9 +527,9 @@ def twowaysAMI(communicator, p): oneway = Test.MyClassPrx.uncheckedCast(p.ice_oneway()) cb = AMI_MyClass_opVoidExI() try: - oneway.opVoid_async(cb) + oneway.opVoid_async(cb) except Ice.Exception: - test(False) + test(False) test(cb.check()) # Check that a call to a twoway operation raises TwowayOnlyException @@ -537,9 +537,9 @@ def twowaysAMI(communicator, p): oneway = Test.MyClassPrx.uncheckedCast(p.ice_oneway()) cb = AMI_MyClass_opByteExI() try: - oneway.opByte_async(cb, 0, 0) + oneway.opByte_async(cb, 0, 0) except Ice.Exception: - test(False) + test(False) test(cb.check()) # @@ -867,7 +867,7 @@ def twowaysAMI(communicator, p): ic = Ice.initialize(data=initData) ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'} - + p = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010 -t 10000")) ic.getImplicitContext().setContext(ctx) diff --git a/py/test/Ice/retry/AllTests.py b/py/test/Ice/retry/AllTests.py index 05504f1e1a7..2e2d3762bb6 100644 --- a/py/test/Ice/retry/AllTests.py +++ b/py/test/Ice/retry/AllTests.py @@ -56,7 +56,7 @@ class AMIException(CallbackBase): test(False) def ice_exception(self, ex): - test(isinstance(ex, Ice.ConnectionLostException)) + test(isinstance(ex, Ice.ConnectionLostException)) self.called() def allTests(communicator): @@ -84,7 +84,7 @@ def allTests(communicator): print "calling operation to kill connection with second proxy...", try: retry2.op(True) - test(False) + test(False) except Ice.ConnectionLostException: print "ok" diff --git a/py/test/Ice/retry/TestI.py b/py/test/Ice/retry/TestI.py index d1c3e32fee4..c646ff9403f 100644 --- a/py/test/Ice/retry/TestI.py +++ b/py/test/Ice/retry/TestI.py @@ -13,8 +13,8 @@ import Ice, Test class RetryI(Test.Retry): def op(self, kill, current=None): - if kill: - current.con.close(True) + if kill: + current.con.close(True) def shutdown(self, current=None): current.adapter.getCommunicator().shutdown() diff --git a/py/test/Ice/servantLocator/AllTests.py b/py/test/Ice/servantLocator/AllTests.py index 0fc07d1f4b4..44cda40272a 100644 --- a/py/test/Ice/servantLocator/AllTests.py +++ b/py/test/Ice/servantLocator/AllTests.py @@ -17,64 +17,64 @@ def test(b): def testExceptions(obj, collocated): try: - obj.requestFailedException() - test(false) + obj.requestFailedException() + test(false) except Ice.ObjectNotExistException, ex: - if not collocated: - test(ex.id == obj.ice_getIdentity()) - test(ex.facet == obj.ice_getFacet()) - test(ex.operation == "requestFailedException") + if not collocated: + test(ex.id == obj.ice_getIdentity()) + test(ex.facet == obj.ice_getFacet()) + test(ex.operation == "requestFailedException") try: - obj.unknownUserException() - test(false) + obj.unknownUserException() + test(false) except Ice.UnknownUserException, ex: - test(ex.unknown == "reason") - pass + test(ex.unknown == "reason") + pass try: - obj.unknownLocalException() - test(false) + obj.unknownLocalException() + test(false) except Ice.UnknownLocalException, ex: - test(ex.unknown == "reason") - pass + test(ex.unknown == "reason") + pass try: - obj.unknownException() - test(false) + obj.unknownException() + test(false) except Ice.UnknownException, ex: - test(ex.unknown == "reason") - pass + test(ex.unknown == "reason") + pass try: - obj.userException() - test(false) + obj.userException() + test(false) except Ice.UnknownUserException, ex: - #print ex.unknown - test(not collocated) - test(ex.unknown.find("Test.TestIntfUserException") >= 0) + #print ex.unknown + test(not collocated) + test(ex.unknown.find("Test.TestIntfUserException") >= 0) except Test.TestIntfUserException: - test(collocated) + test(collocated) try: - obj.localException() - test(false) + obj.localException() + test(false) except Ice.UnknownLocalException, ex: - #print ex.unknown - test(not collocated) - test(ex.unknown.find("Ice.SocketException") >= 0) + #print ex.unknown + test(not collocated) + test(ex.unknown.find("Ice.SocketException") >= 0) except SocketException: - test(collocated) + test(collocated) try: - obj.pythonException() - test(false) + obj.pythonException() + test(false) except Ice.UnknownException, ex: - #print ex.unknown - test(not collocated) - test(ex.unknown.find("RuntimeError: message") >= 0) + #print ex.unknown + test(not collocated) + test(ex.unknown.find("RuntimeError: message") >= 0) except RuntimeError: - test(collocated) + test(collocated) def allTests(communicator, collocated): print "testing stringToProxy... ", @@ -95,9 +95,9 @@ def allTests(communicator, collocated): base = communicator.stringToProxy("category/locate:default -p 12010 -t 10000") obj = Test.TestIntfPrx.checkedCast(base) try: - Test.TestIntfPrx.checkedCast(communicator.stringToProxy("category/unknown:default -p 12010 -t 10000")) + Test.TestIntfPrx.checkedCast(communicator.stringToProxy("category/unknown:default -p 12010 -t 10000")) except Ice.ObjectNotExistException: - pass + pass print "ok" print "testing default servant locator...", @@ -107,13 +107,13 @@ def allTests(communicator, collocated): base = communicator.stringToProxy("locate:default -p 12010 -t 10000") obj = Test.TestIntfPrx.checkedCast(base) try: - Test.TestIntfPrx.checkedCast(communicator.stringToProxy("anothercat/unknown:default -p 12010 -t 10000")) + Test.TestIntfPrx.checkedCast(communicator.stringToProxy("anothercat/unknown:default -p 12010 -t 10000")) except Ice.ObjectNotExistException: - pass + pass try: - Test.TestIntfPrx.checkedCast(communicator.stringToProxy("unknown:default -p 12010 -t 10000")) + Test.TestIntfPrx.checkedCast(communicator.stringToProxy("unknown:default -p 12010 -t 10000")) except Ice.ObjectNotExistException: - pass + pass print "ok" print "testing locate exceptions... ", diff --git a/py/test/Ice/servantLocator/Client.py b/py/test/Ice/servantLocator/Client.py index 47c7f18f241..f5f2023be23 100644 --- a/py/test/Ice/servantLocator/Client.py +++ b/py/test/Ice/servantLocator/Client.py @@ -26,8 +26,8 @@ import Test, AllTests class TestClient(Ice.Application): def run(self, args): - obj = AllTests.allTests(self.communicator(), False) - obj.shutdown() + obj = AllTests.allTests(self.communicator(), False) + obj.shutdown() return 0 app = TestClient() diff --git a/py/test/Ice/servantLocator/Collocated.py b/py/test/Ice/servantLocator/Collocated.py index 2c338d08126..20eaabf0a67 100644 --- a/py/test/Ice/servantLocator/Collocated.py +++ b/py/test/Ice/servantLocator/Collocated.py @@ -30,15 +30,15 @@ class TestServer(Ice.Application): self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0") adapter = self.communicator().createObjectAdapter("TestAdapter") - adapter.activate() + adapter.activate() adapter.addServantLocator(TestI.ServantLocatorI("category"), "category") adapter.addServantLocator(TestI.ServantLocatorI(""), "") - adapter.add(TestI.TestI(), self.communicator().stringToIdentity("asm")) + adapter.add(TestI.TestI(), self.communicator().stringToIdentity("asm")) - AllTests.allTests(self.communicator(), False) + AllTests.allTests(self.communicator(), False) - adapter.deactivate() - adapter.waitForDeactivate() + adapter.deactivate() + adapter.waitForDeactivate() return 0 app = TestServer() diff --git a/py/test/Ice/servantLocator/Server.py b/py/test/Ice/servantLocator/Server.py index f4714bb7b16..1a4bde4dd2a 100644 --- a/py/test/Ice/servantLocator/Server.py +++ b/py/test/Ice/servantLocator/Server.py @@ -26,13 +26,13 @@ import Test, TestI class TestServer(Ice.Application): def run(self, args): - self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000") - self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0") + self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000") + self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0") adapter = self.communicator().createObjectAdapter("TestAdapter") adapter.addServantLocator(TestI.ServantLocatorI("category"), "category") adapter.addServantLocator(TestI.ServantLocatorI(""), "") - adapter.add(TestI.TestI(), self.communicator().stringToIdentity("asm")) + adapter.add(TestI.TestI(), self.communicator().stringToIdentity("asm")) adapter.activate() adapter.waitForDeactivate() diff --git a/py/test/Ice/servantLocator/ServerAMD.py b/py/test/Ice/servantLocator/ServerAMD.py index 9e6000d5612..82cd7ea12d4 100644 --- a/py/test/Ice/servantLocator/ServerAMD.py +++ b/py/test/Ice/servantLocator/ServerAMD.py @@ -26,13 +26,13 @@ import Test, TestAMDI class TestServer(Ice.Application): def run(self, args): - self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000") - self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0") + self.communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000") + self.communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0") adapter = self.communicator().createObjectAdapter("TestAdapter") adapter.addServantLocator(TestAMDI.ServantLocatorI("category"), "category") adapter.addServantLocator(TestAMDI.ServantLocatorI(""), "") - adapter.add(TestAMDI.TestI(), self.communicator().stringToIdentity("asm")) + adapter.add(TestAMDI.TestI(), self.communicator().stringToIdentity("asm")) adapter.activate() adapter.waitForDeactivate() diff --git a/py/test/Ice/servantLocator/TestAMDI.py b/py/test/Ice/servantLocator/TestAMDI.py index e2b98c109a9..74a892f1554 100644 --- a/py/test/Ice/servantLocator/TestAMDI.py +++ b/py/test/Ice/servantLocator/TestAMDI.py @@ -18,29 +18,29 @@ def test(b): class TestI(Test.TestIntf): def requestFailedException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def unknownUserException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def unknownLocalException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def unknownException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def localException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def userException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def pythonException_async(self, cb, current=None): - cb.ice_response() + cb.ice_response() def shutdown_async(self, cb, current=None): current.adapter.deactivate() - cb.ice_response() + cb.ice_response() class CookieI(Test.Cookie): def message(self): @@ -49,7 +49,7 @@ class CookieI(Test.Cookie): class ServantLocatorI(Ice.ServantLocator): def __init__(self, category): self._deactivated = False - self._category = category + self._category = category def __del__(self): test(self._deactivated) @@ -57,25 +57,25 @@ class ServantLocatorI(Ice.ServantLocator): def locate(self, current): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - - if current.id.name == "unknown": - return None + test(current.id.category == self._category or self._category == "") + + if current.id.name == "unknown": + return None - test(current.id.name == "locate" or current.id.name == "finished") - if current.id.name == "locate": - self.exception(current) + test(current.id.name == "locate" or current.id.name == "finished") + if current.id.name == "locate": + self.exception(current) return (TestI(), CookieI()) def finished(self, current, servant, cookie): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - test(current.id.name == "locate" or current.id.name == "finished") - - if current.id.name == "finished": - self.exception(current) + test(current.id.category == self._category or self._category == "") + test(current.id.name == "locate" or current.id.name == "finished") + + if current.id.name == "finished": + self.exception(current) test(isinstance(cookie, Test.Cookie)) test(cookie.message() == 'blahblah') @@ -86,25 +86,25 @@ class ServantLocatorI(Ice.ServantLocator): self._deactivated = True def exception(self, current): - if current.operation == "requestFailedException": - raise Ice.ObjectNotExistException() - elif current.operation == "unknownUserException": - ex = Ice.UnknownUserException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownLocalException": - ex = Ice.UnknownLocalException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownException": - ex = Ice.UnknownException() - ex.unknown = "reason" - raise ex - elif current.operation == "userException": - raise Test.TestIntfUserException() - elif current.operation == "localException": - ex = Ice.SocketException() - ex.error = 0 - raise ex - elif current.operation == "pythonException": - raise RuntimeError("message") + if current.operation == "requestFailedException": + raise Ice.ObjectNotExistException() + elif current.operation == "unknownUserException": + ex = Ice.UnknownUserException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownLocalException": + ex = Ice.UnknownLocalException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownException": + ex = Ice.UnknownException() + ex.unknown = "reason" + raise ex + elif current.operation == "userException": + raise Test.TestIntfUserException() + elif current.operation == "localException": + ex = Ice.SocketException() + ex.error = 0 + raise ex + elif current.operation == "pythonException": + raise RuntimeError("message") diff --git a/py/test/Ice/servantLocator/TestI.py b/py/test/Ice/servantLocator/TestI.py index 4a9eabf33c8..c5768071fc2 100644 --- a/py/test/Ice/servantLocator/TestI.py +++ b/py/test/Ice/servantLocator/TestI.py @@ -18,25 +18,25 @@ def test(b): class TestI(Test.TestIntf): def requestFailedException(self, current=None): - pass + pass def unknownUserException(self, current=None): - pass + pass def unknownLocalException(self, current=None): - pass + pass def unknownException(self, current=None): - pass + pass def localException(self, current=None): - pass + pass def userException(self, current=None): - pass + pass def pythonException(self, current=None): - pass + pass def shutdown(self, current=None): current.adapter.deactivate() @@ -48,7 +48,7 @@ class CookieI(Test.Cookie): class ServantLocatorI(Ice.ServantLocator): def __init__(self, category): self._deactivated = False - self._category = category + self._category = category def __del__(self): test(self._deactivated) @@ -56,25 +56,25 @@ class ServantLocatorI(Ice.ServantLocator): def locate(self, current): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - - if current.id.name == "unknown": - return None + test(current.id.category == self._category or self._category == "") + + if current.id.name == "unknown": + return None - test(current.id.name == "locate" or current.id.name == "finished") - if current.id.name == "locate": - self.exception(current) + test(current.id.name == "locate" or current.id.name == "finished") + if current.id.name == "locate": + self.exception(current) return (TestI(), CookieI()) def finished(self, current, servant, cookie): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - test(current.id.name == "locate" or current.id.name == "finished") - - if current.id.name == "finished": - self.exception(current) + test(current.id.category == self._category or self._category == "") + test(current.id.name == "locate" or current.id.name == "finished") + + if current.id.name == "finished": + self.exception(current) test(isinstance(cookie, Test.Cookie)) test(cookie.message() == 'blahblah') @@ -85,25 +85,25 @@ class ServantLocatorI(Ice.ServantLocator): self._deactivated = True def exception(self, current): - if current.operation == "requestFailedException": - raise Ice.ObjectNotExistException() - elif current.operation == "unknownUserException": - ex = Ice.UnknownUserException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownLocalException": - ex = Ice.UnknownLocalException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownException": - ex = Ice.UnknownException() - ex.unknown = "reason" - raise ex - elif current.operation == "userException": - raise Test.TestIntfUserException() - elif current.operation == "localException": - ex = Ice.SocketException() - ex.error = 0 - raise ex - elif current.operation == "pythonException": - raise RuntimeError("message") + if current.operation == "requestFailedException": + raise Ice.ObjectNotExistException() + elif current.operation == "unknownUserException": + ex = Ice.UnknownUserException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownLocalException": + ex = Ice.UnknownLocalException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownException": + ex = Ice.UnknownException() + ex.unknown = "reason" + raise ex + elif current.operation == "userException": + raise Test.TestIntfUserException() + elif current.operation == "localException": + ex = Ice.SocketException() + ex.error = 0 + raise ex + elif current.operation == "pythonException": + raise RuntimeError("message") diff --git a/py/test/Ice/slicing/exceptions/AllTests.py b/py/test/Ice/slicing/exceptions/AllTests.py index 4be1df50191..de8e4adf6d6 100644 --- a/py/test/Ice/slicing/exceptions/AllTests.py +++ b/py/test/Ice/slicing/exceptions/AllTests.py @@ -242,7 +242,7 @@ def allTests(communicator): print "base... ", try: t.baseAsBase() - test(false) + test(false) except Test.Base, b: test(b.b == "Base.b") test(b.ice_name() == "Test::Base") @@ -259,7 +259,7 @@ def allTests(communicator): print "slicing of unknown derived... ", try: t.unknownDerivedAsBase() - test(false) + test(false) except Test.Base, b: test(b.b == "UnknownDerived.b") test(b.ice_name() == "Test::Base") @@ -276,7 +276,7 @@ def allTests(communicator): print "non-slicing of known derived as base... ", try: t.knownDerivedAsBase() - test(false) + test(false) except Test.KnownDerived, k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") @@ -294,7 +294,7 @@ def allTests(communicator): print "non-slicing of known derived as derived... ", try: t.knownDerivedAsKnownDerived() - test(false) + test(false) except Test.KnownDerived, k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") @@ -312,7 +312,7 @@ def allTests(communicator): print "slicing of unknown intermediate as base... ", try: t.unknownIntermediateAsBase() - test(false) + test(false) except Test.Base, b: test(b.b == "UnknownIntermediate.b") test(b.ice_name() == "Test::Base") @@ -329,7 +329,7 @@ def allTests(communicator): print "slicing of known intermediate as base... ", try: t.knownIntermediateAsBase() - test(false) + test(false) except Test.KnownIntermediate, ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") @@ -347,7 +347,7 @@ def allTests(communicator): print "slicing of known most derived as base... ", try: t.knownMostDerivedAsBase() - test(false) + test(false) except Test.KnownMostDerived, kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -366,7 +366,7 @@ def allTests(communicator): print "non-slicing of known intermediate as intermediate... ", try: t.knownIntermediateAsKnownIntermediate() - test(false) + test(false) except Test.KnownIntermediate, ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") @@ -384,7 +384,7 @@ def allTests(communicator): print "non-slicing of known most derived exception as intermediate... ", try: t.knownMostDerivedAsKnownIntermediate() - test(false) + test(false) except Test.KnownMostDerived, kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -403,7 +403,7 @@ def allTests(communicator): print "non-slicing of known most derived as most derived... ", try: t.knownMostDerivedAsKnownMostDerived() - test(false) + test(false) except Test.KnownMostDerived, kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -422,7 +422,7 @@ def allTests(communicator): print "slicing of unknown most derived, known intermediate as base... ", try: t.unknownMostDerived1AsBase() - test(false) + test(false) except Test.KnownIntermediate, ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") @@ -440,7 +440,7 @@ def allTests(communicator): print "slicing of unknown most derived, known intermediate as intermediate... ", try: t.unknownMostDerived1AsKnownIntermediate() - test(false) + test(false) except Test.KnownIntermediate, ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") @@ -458,7 +458,7 @@ def allTests(communicator): print "slicing of unknown most derived, unknown intermediate as base... ", try: t.unknownMostDerived2AsBase() - test(false) + test(false) except Test.Base, b: test(b.b == "UnknownMostDerived2.b") test(b.ice_name() == "Test::Base") diff --git a/py/test/Ice/slicing/objects/AllTests.py b/py/test/Ice/slicing/objects/AllTests.py index e1e5ee5c4ba..d5028bd8e79 100644 --- a/py/test/Ice/slicing/objects/AllTests.py +++ b/py/test/Ice/slicing/objects/AllTests.py @@ -456,9 +456,9 @@ def allTests(communicator): print "unknown with Object as Object (AMI)... ", try: - cb = AMI_Test_SUnknownAsObjectI() - t.SUnknownAsObject_async(cb) - test(cb.check()) + cb = AMI_Test_SUnknownAsObjectI() + t.SUnknownAsObject_async(cb) + test(cb.check()) except Ice.NoObjectFactoryException: pass except Ice.Exception: diff --git a/py/test/Ice/slicing/objects/Test.ice b/py/test/Ice/slicing/objects/Test.ice index 9d31ce660b5..01e91579311 100644 --- a/py/test/Ice/slicing/objects/Test.ice +++ b/py/test/Ice/slicing/objects/Test.ice @@ -67,7 +67,7 @@ exception DerivedException extends BaseException D1 pd1; }; -class Forward; // Forward-declared class defined in another compilation unit +class Forward; // Forward-declared class defined in another compilation unit ["ami"] interface TestIntf { @@ -104,7 +104,7 @@ class Forward; // Forward-declared class defined in another compilation unit void throwDerivedAsDerived() throws DerivedException; void throwUnknownDerivedAsBase() throws BaseException; - void useForward(out Forward f); // Use of forward-declared class to verify that code is generated correctly. + void useForward(out Forward f); // Use of forward-declared class to verify that code is generated correctly. void shutdown(); }; diff --git a/py/test/Ice/slicing/objects/TestAMD.ice b/py/test/Ice/slicing/objects/TestAMD.ice index 9303d9e8325..1fe41bec3f5 100644 --- a/py/test/Ice/slicing/objects/TestAMD.ice +++ b/py/test/Ice/slicing/objects/TestAMD.ice @@ -67,7 +67,7 @@ exception DerivedException extends BaseException D1 pd1; }; -class Forward; // Forward-declared class defined in another compilation unit +class Forward; // Forward-declared class defined in another compilation unit ["ami", "amd"] interface TestIntf { @@ -104,7 +104,7 @@ class Forward; // Forward-declared class defined in another compilation unit void throwDerivedAsDerived() throws DerivedException; void throwUnknownDerivedAsBase() throws BaseException; - void useForward(out Forward f); // Use of forward-declared class to verify that code is generated correctly. + void useForward(out Forward f); // Use of forward-declared class to verify that code is generated correctly. void shutdown(); }; |