From: Zac Medico Date: Wed, 10 Jan 2007 21:13:43 +0000 (-0000) Subject: Fix sys.path so that imports work correctly. X-Git-Tag: v2.1.2~98 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5959e553ab4230428ae36f9b25d92da3a8518f20;p=portage.git Fix sys.path so that imports work correctly. svn path=/main/trunk/; revision=5533 --- 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()