[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/testrunner.py Moved the configure_logging up in the order of operations.

Jim Fulton jim at zope.com
Fri Oct 28 19:36:40 EDT 2005


Log message for revision 39704:
  Moved the configure_logging up in the order of operations.
  Custom option handlers (like Zope 2's config-file handler) might set
  logging policies of their own and we don't want to mess with them.
  
  This part of the test runner isn't tested. :(
  

Changed:
  U   zope.testing/trunk/src/zope/testing/testrunner.py

-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner.py	2005-10-28 23:33:11 UTC (rev 39703)
+++ zope.testing/trunk/src/zope/testing/testrunner.py	2005-10-28 23:36:39 UTC (rev 39704)
@@ -130,6 +130,11 @@
     if args is None:
         args = sys.argv
 
+    # Set the default logging policy.
+    # XXX There are no tests for this logging behavior.
+    # It's not at all clear that the test runner should be doing this.
+    configure_logging()
+
     # Control reporting flags during run
     old_reporting_flags = doctest.set_unittest_reportflags(0)
 
@@ -292,8 +297,6 @@
 
     remove_stale_bytecode(options)
 
-    configure_logging()
-
     tests_by_layer_name = find_tests(options)
 
     ran = 0



More information about the Zope3-Checkins mailing list