diff options
author | Jose <jose@zeroc.com> | 2018-08-06 11:56:42 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-08-06 11:56:42 +0200 |
commit | 7972f07a3aa244dcde673b7cb5541e70da9193bb (patch) | |
tree | 117faced1bb36ac256c7d362e11ac1c49e8e8c88 /python/test/Slice/structure/Client.py | |
parent | Update JavaScript tests to use TestHelper class (diff) | |
download | ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.bz2 ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.tar.xz ice-7972f07a3aa244dcde673b7cb5541e70da9193bb.zip |
Python test suite updates
Diffstat (limited to 'python/test/Slice/structure/Client.py')
-rwxr-xr-x | python/test/Slice/structure/Client.py | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/python/test/Slice/structure/Client.py b/python/test/Slice/structure/Client.py index 46820ea2289..a6aabfe9aaf 100755 --- a/python/test/Slice/structure/Client.py +++ b/python/test/Slice/structure/Client.py @@ -8,24 +8,18 @@ # # ********************************************************************** -import os, sys, traceback +from TestHelper import TestHelper +TestHelper.loadSlice('Test.ice') +import sys +import copy +import Test -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "python", "Ice", "__init__.py")): - break -else: - raise RuntimeError("can't find toplevel directory!") - -import Ice - -Ice.loadSlice('Test.ice') -import Test, copy def test(b): if not b: raise RuntimeError('test assertion failed') + def allTests(communicator): sys.stdout.write("testing equals() for Slice structures... ") sys.stdout.flush() @@ -187,18 +181,10 @@ def allTests(communicator): print("ok") -def run(args, communicator): - allTests(communicator) - return True +class Client(TestHelper): -try: - initData = Ice.InitializationData() - initData.properties = Ice.createProperties(sys.argv) - with Ice.initialize(sys.argv, initData) as communicator: - status = run(sys.argv, communicator) -except: - traceback.print_exc() - status = False + def run(self, args): -sys.exit(not status) + with self.initialize(args=args) as communicator: + allTests(communicator) |