[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/tests/test.py Short-circuit the test initialization when no tests of a kind need to be run.

Gintautas Miliauskas gintas at pov.lt
Wed Jun 16 08:26:46 EDT 2004


Log message for revision 25419:
Short-circuit the test initialization when no tests of a kind need to be run.



-=-
Modified: Zope3/trunk/src/zope/app/tests/test.py
===================================================================
--- Zope3/trunk/src/zope/app/tests/test.py	2004-06-16 12:14:19 UTC (rev 25418)
+++ Zope3/trunk/src/zope/app/tests/test.py	2004-06-16 12:26:45 UTC (rev 25419)
@@ -752,6 +752,10 @@
     pathinit = PathInit(BUILD, BUILD_INPLACE, libdir)
 
     files = find_tests(module_filter)
+    if not files:
+        print ("No %s tests to be run."
+               % (functional and "functional" or "unit"))
+        return
     files.sort()
 
     # Make sure functional tests find ftesting.zcml




More information about the Zope3-Checkins mailing list