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/Ice/packagemd/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/Ice/packagemd/Client.py')
-rwxr-xr-x | python/test/Ice/packagemd/Client.py | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/python/test/Ice/packagemd/Client.py b/python/test/Ice/packagemd/Client.py index 327b68dadb1..5cd23baeff5 100755 --- a/python/test/Ice/packagemd/Client.py +++ b/python/test/Ice/packagemd/Client.py @@ -8,31 +8,16 @@ # # ********************************************************************** -import os, sys, traceback -import Ice - -import Ice - -Ice.loadSlice("--all -I. Test.ice") +from TestHelper import TestHelper +TestHelper.loadSlice("--all -I. Test.ice") import AllTests -def test(b): - if not b: - raise RuntimeError('test assertion failed') - -def run(args, communicator): - initial = AllTests.allTests(communicator) - initial.shutdown() - return True -try: - initData = Ice.InitializationData() - initData.properties = Ice.createProperties(sys.argv) - initData.properties.setProperty('Ice.Warn.Dispatch', '0') - with Ice.initialize(sys.argv, initData) as communicator: - status = run(sys.argv, communicator) -except: - traceback.print_exc() - status = False +class Client(TestHelper): -sys.exit(not status) + def run(self, args): + properties = self.createTestProperties(args) + properties.setProperty('Ice.Warn.Dispatch', '0') + with self.initialize(properties=properties) as communicator: + initial = AllTests.allTests(self, communicator) + initial.shutdown() |