summaryrefslogtreecommitdiff
path: root/py/test/Ice/exceptions/ServerAMD.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/test/Ice/exceptions/ServerAMD.py')
-rwxr-xr-xpy/test/Ice/exceptions/ServerAMD.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/py/test/Ice/exceptions/ServerAMD.py b/py/test/Ice/exceptions/ServerAMD.py
index 41b3fb3675e..36345b1e040 100755
--- a/py/test/Ice/exceptions/ServerAMD.py
+++ b/py/test/Ice/exceptions/ServerAMD.py
@@ -19,6 +19,10 @@ if not slice_dir:
Ice.loadSlice('"-I' + slice_dir + '" TestAMD.ice')
import Test
+def test(b):
+ if not b:
+ raise RuntimeError('test assertion failed')
+
class ThrowerI(Test.Thrower):
def shutdown_async(self, cb, current=None):
current.adapter.getCommunicator().shutdown()
@@ -109,6 +113,13 @@ class ThrowerI(Test.Thrower):
cb.ice_exception(Ice.TimeoutException())
def throwNonIceException_async(self, cb, current=None):
+ # Python-specific: make sure the argument is validated.
+ try:
+ cb.ice_exception('foo')
+ test(False)
+ except TypeError:
+ pass
+
cb.ice_exception(RuntimeError("12345"))
def throwAssertException_async(self, cb, current=None):