[Zope-Checkins] CVS: Zope/utilities - testrunner.py:1.27.4.2

Chris McDonough chrism@zope.com
Sun, 24 Nov 2002 19:11:24 -0500


Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv18706

Modified Files:
      Tag: chrism-install-branch
	testrunner.py 
Log Message:
Merge with HEAD.


=== Zope/utilities/testrunner.py 1.27.4.1 => 1.27.4.2 ===
--- Zope/utilities/testrunner.py:1.27.4.1	Tue Sep 10 23:36:38 2002
+++ Zope/utilities/testrunner.py	Sun Nov 24 19:11:23 2002
@@ -58,6 +58,8 @@
             sys.path.append(path)       # let module find things in its dir
             try:
                 module=imp.load_module(name, file, pathname, desc)
+            except KeyboardInterrupt:
+                raise
             except:
                 (tb_t, tb_v, tb_tb) = sys.exc_info()
                 self.report("Module %s failed to load\n%s: %s" % (pathname,
@@ -109,6 +111,9 @@
             Return a list of the names to be traversed to build tests.
         """
         names = os.listdir(pathname)
+        if "build" in names:
+            # Don't recurse into build directories created by setup.py
+            names.remove("build")
         if '.testinfo' in names:  # allow local control
             f = open( os.path.join( pathname, '.testinfo' ) )
             lines = filter( None, f.readlines() )
@@ -143,6 +148,8 @@
                     os.chdir(dirname)
                 try:
                     suite = self.getSuiteFromFile(name)
+                except KeyboardInterrupt:
+                    raise
                 except:
                     self.report('No test suite found in file:\n%s\n' % pathname)
                     if self.verbosity > 1:
@@ -183,7 +190,10 @@
                 sys.stderr.write( '*** Changing directory to: %s\n' % dirname )
             os.chdir(dirname)
         self.report('Running: %s' % filename)
-        try:    suite=self.getSuiteFromFile(name)
+        try:
+            suite=self.getSuiteFromFile(name)
+        except KeyboardInterrupt:
+            raise
         except:
             traceback.print_exc()
             suite=None
@@ -219,8 +229,7 @@
        -a
 
           Run all tests found in all subdirectories of the current
-          working directory. This is the default if no options are
-          specified.
+          working directory.
 
        -m