[Zope-Checkins] SVN: Zope/trunk/test.py Print path that is actually
scanned for tests, not libdir.
Stefan H. Holek
stefan at epy.co.at
Wed Aug 11 14:28:14 EDT 2004
Log message for revision 27014:
Print path that is actually scanned for tests, not libdir.
Changed:
U Zope/trunk/test.py
-=-
Modified: Zope/trunk/test.py
===================================================================
--- Zope/trunk/test.py 2004-08-11 18:28:02 UTC (rev 27013)
+++ Zope/trunk/test.py 2004-08-11 18:28:14 UTC (rev 27014)
@@ -377,15 +377,19 @@
sys.path.insert(0, os.path.join(self.home, self.libdir))
self.cwd = os.path.realpath(os.getcwd())
# Hack again for external products.
- global functional
- kind = functional and "functional" or "unit"
if libdir:
self.libdir = os.path.realpath(os.path.join(self.cwd, libdir))
else:
self.libdir = os.path.realpath(os.path.join(self.cwd, self.libdir))
if self.libdir not in sys.path:
sys.path.insert(0, self.libdir)
- print "Running %s tests from %s" % (kind, self.libdir)
+ # Determine where to look for tests
+ if test_dir:
+ self.testdir = os.path.abspath(os.path.join(self.cwd, test_dir))
+ else:
+ self.testdir = self.libdir
+ kind = functional and "functional" or "unit"
+ print "Running %s tests from %s" % (kind, self.testdir)
def match(rx, s):
if not rx:
@@ -470,11 +474,7 @@
def find_tests(rx):
global finder
finder = TestFileFinder(pathinit.libdir)
- if test_dir:
- walkdir = os.path.abspath(os.path.join(pathinit.cwd, test_dir))
- else:
- walkdir = pathinit.libdir
- walk_with_symlinks(walkdir, finder.visit, rx)
+ walk_with_symlinks(pathinit.testdir, finder.visit, rx)
return finder.files
def package_import(modname):
More information about the Zope-Checkins
mailing list