Fix sys.path so that imports work correctly.
authorZac Medico <zmedico@gentoo.org>
Wed, 10 Jan 2007 21:13:43 +0000 (21:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 10 Jan 2007 21:13:43 +0000 (21:13 -0000)
svn path=/main/trunk/; revision=5533

tests/runTests

index fed58f75db8a88f17c4f15f4a93bb1461b4d87d9..c44d3678845319bbc29d850720520fe526f7bc71 100755 (executable)
@@ -5,16 +5,16 @@
 # $Id$
 
 
-import sys
+import os, sys
 import os.path as osp
 
-# Grab SVN portage files instead of normal ones.
-sys.path.insert(0,'../pym')
-
 # Insert our parent dir so we can do shiny import "tests"
 # This line courtesy of Marienz and Pkgcore ;)
 sys.path.insert(0, osp.dirname(osp.dirname(osp.abspath(__file__))))
 
+# Grab SVN portage files instead of normal ones.
+sys.path.insert(0, os.path.join(sys.path[0], "pym"))
+
 import tests
 if __name__ == "__main__":
        result = tests.main()