From dc53d4f5ef67fb5ae1a5d44a37db81ef6b391e6f Mon Sep 17 00:00:00 2001 From: david-sarah Date: Sun, 8 Aug 2010 08:43:07 -0700 Subject: [PATCH] test_runner.py: another try at calculating the rootdir correctly for test-from-egg and test-from-prefixdir. --- src/allmydata/test/test_runner.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 373cafbd..161af235 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -17,14 +17,10 @@ timeout = 240 srcfile = allmydata.__file__ srcdir = os.path.dirname(os.path.dirname(os.path.realpath(srcfile))) -if os.path.normcase(srcdir).endswith('.egg'): - srcdir = os.path.dirname(srcdir) -elif os.path.normcase(os.path.basename(srcdir)) == 'site-packages': +if os.path.normcase(os.path.basename(srcdir)) == 'site-packages': srcdir = os.path.dirname(srcdir) if re.search(r'python.+\..+', os.path.normcase(os.path.basename(srcdir))): srcdir = os.path.dirname(srcdir) - if os.path.normcase(os.path.basename(srcdir)) == 'lib': - srcdir = os.path.dirname(srcdir) rootdir = os.path.dirname(srcdir) -- 2.45.2