summaryrefslogtreecommitdiff
path: root/python/test/Slice/import
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Slice/import')
-rwxr-xr-xpython/test/Slice/import/Client.py36
1 files changed, 13 insertions, 23 deletions
diff --git a/python/test/Slice/import/Client.py b/python/test/Slice/import/Client.py
index 93811469483..c5f65ba3d86 100755
--- a/python/test/Slice/import/Client.py
+++ b/python/test/Slice/import/Client.py
@@ -8,36 +8,26 @@
#
# **********************************************************************
-import os, sys, traceback
-
-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!")
-
+from TestHelper import TestHelper
+import sys
import Test
-status = True
def test(b):
if not b:
raise RuntimeError('test assertion failed')
-try:
- sys.stdout.write("testing imports... ")
- sys.stdout.flush()
- test(Test.SubA.SubSubA1.Value1 == 10)
- test(Test.SubA.SubSubA1.Value2 == 11)
- test(Test.SubA.SubSubA2.Value1 == 30)
- test(Test.SubB.SubSubB1.Value1 == 20)
- test(Test.SubB.SubSubB1.Value2 == 21)
+class Client(TestHelper):
+
+ def run(self, args):
+ sys.stdout.write("testing imports... ")
+ sys.stdout.flush()
- print("ok")
-except:
- traceback.print_exc()
- status = False
+ test(Test.SubA.SubSubA1.Value1 == 10)
+ test(Test.SubA.SubSubA1.Value2 == 11)
+ test(Test.SubA.SubSubA2.Value1 == 30)
+ test(Test.SubB.SubSubB1.Value1 == 20)
+ test(Test.SubB.SubSubB1.Value2 == 21)
-sys.exit(not status)
+ print("ok")