Log message for revision 38408:
  'ZPublisher.Test.publish' now takes a 'done_string' argument.
  
  o The value  is written to standard error when the request completes (forward
    ported from 2.7 branch).
  
  

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  U   Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Test.py

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===================================================================
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt       2005-09-08 17:47:28 UTC 
(rev 38407)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt       2005-09-08 19:24:23 UTC 
(rev 38408)
@@ -26,6 +26,10 @@
 
     Bugs Fixed
 
+      - 'ZPublisher.Test.publish' now takes a 'done_string' argument, which
+        is written to standard error when the request completes (forward
+        ported from Zope 2.7 branch).
+
       - Collector #556:  <dtml-sqlvar> now returns 'null' instead of 'None'
         for values which are None in Python (sponsored by a bounty from
         Logicalware).

Modified: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Test.py
===================================================================
--- Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Test.py 2005-09-08 
17:47:28 UTC (rev 38407)
+++ Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Test.py 2005-09-08 
19:24:23 UTC (rev 38408)
@@ -94,12 +94,13 @@
 '''
 __version__='$Revision: 1.41 $'[11:-2]
 
+DONE_STRING_DEFAULT = '\n%s\n\n' % ('_'*60)
+
 import sys, traceback, profile, os, getopt
 from time import clock
 repeat_count=100
 TupleType=type(())
 
-
 def main():
     import sys, os, getopt
     global repeat_count
@@ -240,7 +241,7 @@
 def publish(script=None,path_info='/',
             u=None,p=None,d=None,t=None,e=None,s=None,pm=0,
             extra=None, request_method='GET',
-            fp=None,
+            fp=None, done_string=DONE_STRING_DEFAULT,
             stdin=sys.stdin):
 
     profile=p
@@ -367,7 +368,7 @@
     elif pm:
         stdout=sys.stdout
         publish_module_pm(file, environ=env, stdout=stdout, extra=extra)
-        print '\n%s\n' % ('_'*60)
+        sys.stderr.write(done_string)
     else:
         if silent:
             stdout=open('/dev/null','w')
@@ -378,6 +379,6 @@
                 stdout=sys.stdout
 
         publish_module(file, environ=env, stdout=stdout, extra=extra)
-        print '\n%s\n' % ('_'*60)
+        sys.stderr.write(done_string)
 
 if __name__ == "__main__": main()

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to