[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests - runtests.py:1.2

Fred L. Drake, Jr. fred at zope.com
Wed Apr 21 13:44:11 EDT 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv10631

Modified Files:
	runtests.py 
Log Message:
cause the test runner not to use docstrings as test descriptions


=== Packages/zpkgtools/zpkgtools/tests/runtests.py 1.1 => 1.2 ===
--- Packages/zpkgtools/zpkgtools/tests/runtests.py:1.1	Thu Mar 18 13:06:38 2004
+++ Packages/zpkgtools/zpkgtools/tests/runtests.py	Wed Apr 21 13:44:07 2004
@@ -33,6 +33,7 @@
     mod = sys.modules[name]
     return mod.test_suite()
 
+
 def test_suite():
     L = []
     for fn in os.listdir(TESTDIR):
@@ -44,7 +45,18 @@
         suite.addTest(t)
     return suite
 
+
+class MyTestProgram(unittest.TestProgram):
+    """Test runner program that doesn't use docstrings as descriptions."""
+
+    def runTests(self):
+        if self.testRunner is None:
+            self.testRunner = unittest.TextTestRunner(descriptions=False,
+                                                      verbosity=self.verbosity)
+        unittest.TestProgram.runTests(self)
+
+
 if __name__ == "__main__":
     if TOPDIR not in sys.path:
         sys.path.insert(0, TOPDIR)
-    unittest.main(defaultTest="test_suite")
+    MyTestProgram(defaultTest="test_suite")




More information about the Zope-CVS mailing list