diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-10-23 13:48:08 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-10-23 13:48:08 +0000 |
commit | 870f0d174af2f10f64fb58c9a89f87b44a5e002d (patch) | |
tree | d1db94eb74b7858290eff9f9e4d85b430c46cc1b /py/test/Ice/operations/Client.py | |
parent | fixing the directive names in an INI file (diff) | |
download | ice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.tar.bz2 ice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.tar.xz ice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.zip |
eliminate need to set PYTHONPATH in tests
Diffstat (limited to 'py/test/Ice/operations/Client.py')
-rw-r--r-- | py/test/Ice/operations/Client.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/py/test/Ice/operations/Client.py b/py/test/Ice/operations/Client.py index b85d777d162..67c21d189ef 100644 --- a/py/test/Ice/operations/Client.py +++ b/py/test/Ice/operations/Client.py @@ -7,7 +7,19 @@ # # ********************************************************************** -import sys, traceback, Ice, AllTests +import os, sys, traceback + +for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "python", "Ice.py")): + break +else: + raise "can't find toplevel directory!" + +sys.path.insert(0, os.path.join(toplevel, "python")) +sys.path.insert(0, os.path.join(toplevel, "lib")) + +import Ice, AllTests def test(b): if not b: |