diff options
author | Jose <jose@zeroc.com> | 2018-11-08 23:39:40 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-11-08 23:39:40 +0100 |
commit | 48539e835c16c35195dcbd33783c44a656e92c2a (patch) | |
tree | c8328b3e9a210b2f2d6916384b0d17e861932d05 /python/test | |
parent | Add support for build IceGridGUI with Open JavaFX 11 packages (diff) | |
download | ice-48539e835c16c35195dcbd33783c44a656e92c2a.tar.bz2 ice-48539e835c16c35195dcbd33783c44a656e92c2a.tar.xz ice-48539e835c16c35195dcbd33783c44a656e92c2a.zip |
Do not use "false" in python tests
Close #270
Diffstat (limited to 'python/test')
-rw-r--r-- | python/test/Ice/adapterDeactivation/AllTests.py | 2 | ||||
-rw-r--r-- | python/test/Ice/ami/AllTests.py | 22 | ||||
-rw-r--r-- | python/test/Ice/blobject/RouterI.py | 2 | ||||
-rw-r--r-- | python/test/Ice/defaultServant/AllTests.py | 12 | ||||
-rw-r--r-- | python/test/Ice/exceptions/AllTests.py | 12 | ||||
-rw-r--r-- | python/test/Ice/facets/AllTests.py | 6 | ||||
-rw-r--r-- | python/test/Ice/objects/AllTests.py | 2 | ||||
-rw-r--r-- | python/test/Ice/slicing/exceptions/AllTests.py | 26 |
8 files changed, 42 insertions, 42 deletions
diff --git a/python/test/Ice/adapterDeactivation/AllTests.py b/python/test/Ice/adapterDeactivation/AllTests.py index aabb403d2c1..11801380c72 100644 --- a/python/test/Ice/adapterDeactivation/AllTests.py +++ b/python/test/Ice/adapterDeactivation/AllTests.py @@ -92,7 +92,7 @@ def allTests(helper, communicator): adapter.deactivate() try: obj.ice_getConnection().setAdapter(adapter) - test(false) + test(False) except Ice.ObjectAdapterDeactivatedException: pass print("ok") diff --git a/python/test/Ice/ami/AllTests.py b/python/test/Ice/ami/AllTests.py index d49b1820cd9..a85a640dab5 100644 --- a/python/test/Ice/ami/AllTests.py +++ b/python/test/Ice/ami/AllTests.py @@ -716,7 +716,7 @@ def allTests(helper, communicator, collocated): try: future.result() except: - test(false) + test(False) throwEx(t) f = p.opAsync() try: @@ -739,7 +739,7 @@ def allTests(helper, communicator, collocated): def throwerEx(future): try: future.result() - test(false) + test(False) except: throwEx(t) try: @@ -1136,13 +1136,13 @@ def allTests(helper, communicator, collocated): r2.cancel() try: p.end_ice_ping(r1) - test(false) + test(False) except(Ice.InvocationCanceledException): pass try: p.end_ice_id(r2) - test(false) + test(False) except(Ice.InvocationCanceledException): pass @@ -1161,12 +1161,12 @@ def allTests(helper, communicator, collocated): r2.cancel() try: p.end_op(r1) - test(false) + test(False) except: pass try: p.end_ice_id(r2) - test(false) + test(False) except: pass testController.resumeAdapter() @@ -1266,7 +1266,7 @@ def allTests(helper, communicator, collocated): try: f.result() except: - test(false) + test(False) print("ok") @@ -1842,13 +1842,13 @@ def allTestsFuture(helper, communicator, collocated): f2.cancel() try: f1.result() - test(false) + test(False) except(Ice.InvocationCanceledException): pass try: f2.result() - test(false) + test(False) except(Ice.InvocationCanceledException): pass @@ -1867,12 +1867,12 @@ def allTestsFuture(helper, communicator, collocated): f2.cancel() try: f1.result() - test(false) + test(False) except: pass try: f2.result() - test(false) + test(False) except: pass testController.resumeAdapter() diff --git a/python/test/Ice/blobject/RouterI.py b/python/test/Ice/blobject/RouterI.py index a9501d792b1..d83d6585bbb 100644 --- a/python/test/Ice/blobject/RouterI.py +++ b/python/test/Ice/blobject/RouterI.py @@ -151,7 +151,7 @@ class RouterI(Ice.Router): return (self._blobjectProxy, True) def getServerProxy(self, current): - assert false + assert(False) def addProxies(self, proxies, current): for p in proxies: diff --git a/python/test/Ice/defaultServant/AllTests.py b/python/test/Ice/defaultServant/AllTests.py index 96c393e59b1..d1fa518f785 100644 --- a/python/test/Ice/defaultServant/AllTests.py +++ b/python/test/Ice/defaultServant/AllTests.py @@ -48,14 +48,14 @@ def allTests(helper, communicator): prx = Test.MyObjectPrx.uncheckedCast(oa.createProxy(identity)) try: prx.ice_ping() - test(false) + test(False) except Ice.ObjectNotExistException: # Expected pass try: prx.getName() - test(false) + test(False) except Ice.ObjectNotExistException: # Expected pass @@ -64,14 +64,14 @@ def allTests(helper, communicator): prx = Test.MyObjectPrx.uncheckedCast(oa.createProxy(identity)) try: prx.ice_ping() - test(false) + test(False) except Ice.FacetNotExistException: # Expected pass try: prx.getName() - test(false) + test(False) except Ice.FacetNotExistException: # Expected pass @@ -83,14 +83,14 @@ def allTests(helper, communicator): try: prx.ice_ping() - test(false) + test(False) except Ice.ObjectNotExistException: # Expected pass try: prx.getName() - test(false) + test(False) except Ice.ObjectNotExistException: # Expected pass diff --git a/python/test/Ice/exceptions/AllTests.py b/python/test/Ice/exceptions/AllTests.py index 163caee8ddf..a7b4b0df1ae 100644 --- a/python/test/Ice/exceptions/AllTests.py +++ b/python/test/Ice/exceptions/AllTests.py @@ -221,26 +221,26 @@ def allTests(helper, communicator): adapter.add(obj, Ice.stringToIdentity("x")) try: adapter.add(obj, Ice.stringToIdentity("x")) - test(false) + test(False) except Ice.AlreadyRegisteredException: pass try: adapter.add(obj, Ice.stringToIdentity("")) - test(false) + test(False) except Ice.IllegalIdentityException as ex: test(ex.id.name == "") try: adapter.add(None, Ice.stringToIdentity("x")) - test(false) + test(False) except Ice.IllegalServantException: pass adapter.remove(Ice.stringToIdentity("x")) try: adapter.remove(Ice.stringToIdentity("x")) - test(false) + test(False) except Ice.NotRegisteredException: pass @@ -255,7 +255,7 @@ def allTests(helper, communicator): adapter.addServantLocator(loc, "x") try: adapter.addServantLocator(loc, "x") - test(false) + test(False) except Ice.AlreadyRegisteredException: pass @@ -268,7 +268,7 @@ def allTests(helper, communicator): communicator.getValueFactoryManager().add(ValueFactory, "x") try: communicator.getValueFactoryManager().add(ValueFactory, "x") - test(false) + test(False) except Ice.AlreadyRegisteredException: pass print("ok") diff --git a/python/test/Ice/facets/AllTests.py b/python/test/Ice/facets/AllTests.py index 5c6f55efe90..a85e318700f 100644 --- a/python/test/Ice/facets/AllTests.py +++ b/python/test/Ice/facets/AllTests.py @@ -49,13 +49,13 @@ def allTests(helper, communicator): adapter.addFacet(obj, Ice.stringToIdentity("d"), "facetABCD") try: adapter.addFacet(obj, Ice.stringToIdentity("d"), "facetABCD") - test(false) + test(False) except Ice.AlreadyRegisteredException: pass adapter.removeFacet(Ice.stringToIdentity("d"), "facetABCD") try: adapter.removeFacet(Ice.stringToIdentity("d"), "facetABCD") - test(false) + test(False) except Ice.NotRegisteredException: pass print("ok") @@ -76,7 +76,7 @@ def allTests(helper, communicator): test(fm["f2"] == obj2) try: adapter.removeAllFacets(Ice.stringToIdentity("id1")) - test(false) + test(False) except Ice.NotRegisteredException: pass fm = adapter.removeAllFacets(Ice.stringToIdentity("id2")) diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py index 2f6a5f0fee5..548c2913000 100644 --- a/python/test/Ice/objects/AllTests.py +++ b/python/test/Ice/objects/AllTests.py @@ -146,7 +146,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: initial.throwEDerived() - test(false) + test(False) except Test.EDerived as e: test(e.a1.name == "a1") test(e.a2.name == "a2") diff --git a/python/test/Ice/slicing/exceptions/AllTests.py b/python/test/Ice/slicing/exceptions/AllTests.py index 9dc2054c036..7c27999e99e 100644 --- a/python/test/Ice/slicing/exceptions/AllTests.py +++ b/python/test/Ice/slicing/exceptions/AllTests.py @@ -230,7 +230,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.baseAsBase() - test(false) + test(False) except Test.Base as b: test(b.b == "Base.b") test(b.ice_id() == "::Test::Base") @@ -249,7 +249,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.unknownDerivedAsBase() - test(false) + test(False) except Test.Base as b: test(b.b == "UnknownDerived.b") test(b.ice_id() == "::Test::Base") @@ -268,7 +268,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownDerivedAsBase() - test(false) + test(False) except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") @@ -288,7 +288,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownDerivedAsKnownDerived() - test(false) + test(False) except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") @@ -308,7 +308,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.unknownIntermediateAsBase() - test(false) + test(False) except Test.Base as b: test(b.b == "UnknownIntermediate.b") test(b.ice_id() == "::Test::Base") @@ -327,7 +327,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownIntermediateAsBase() - test(false) + test(False) except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") @@ -347,7 +347,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownMostDerivedAsBase() - test(false) + test(False) except Test.KnownMostDerived as kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -368,7 +368,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownIntermediateAsKnownIntermediate() - test(false) + test(False) except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") @@ -388,7 +388,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownMostDerivedAsKnownIntermediate() - test(false) + test(False) except Test.KnownMostDerived as kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -409,7 +409,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.knownMostDerivedAsKnownMostDerived() - test(false) + test(False) except Test.KnownMostDerived as kmd: test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") @@ -430,7 +430,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.unknownMostDerived1AsBase() - test(false) + test(False) except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") @@ -450,7 +450,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.unknownMostDerived1AsKnownIntermediate() - test(false) + test(False) except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") @@ -471,7 +471,7 @@ def allTests(helper, communicator): sys.stdout.flush() try: t.unknownMostDerived2AsBase() - test(false) + test(False) except Test.Base as b: test(b.b == "UnknownMostDerived2.b") test(b.ice_id() == "::Test::Base") |