summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-10 21:13:43 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-10 21:13:43 +0000
commit5959e553ab4230428ae36f9b25d92da3a8518f20 (patch)
treeabf035576e06b44cbc8468aadf69e9a1e8c0faad /tests
parentFix module loading. (diff)
downloadportage-5959e553ab4230428ae36f9b25d92da3a8518f20.tar.gz
portage-5959e553ab4230428ae36f9b25d92da3a8518f20.tar.bz2
portage-5959e553ab4230428ae36f9b25d92da3a8518f20.zip
Fix sys.path so that imports work correctly.
svn path=/main/trunk/; revision=5533
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runTests8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/runTests b/tests/runTests
index fed58f75d..c44d36788 100755
--- a/tests/runTests
+++ b/tests/runTests
@@ -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()