mailr12126 - /1.3/test_suite/formatting.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 04, 2011 - 11:49:
Author: bugman
Date: Tue Jan  4 11:49:13 2011
New Revision: 12126

URL: http://svn.gna.org/viewcvs/relax?rev=12126&view=rev
Log:
Improvements to the formatting.summary_line() function, and the removal of 
the indentation.


Modified:
    1.3/test_suite/formatting.py

Modified: 1.3/test_suite/formatting.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/formatting.py?rev=12126&r1=12125&r2=12126&view=diff
==============================================================================
--- 1.3/test_suite/formatting.py (original)
+++ 1.3/test_suite/formatting.py Tue Jan  4 11:49:13 2011
@@ -47,21 +47,22 @@
     sys.stdout.write("\n\n\n")
 
 
-def summary_line(name, passed):
+def summary_line(name, passed, width=84):
     """Print a summary line.
 
     @param name:    The name of the test, test category, etc.
     @type name:     str
-    @param passed:  An argment which if True causes '[ OK ]' to be printed 
and if False causes
-                    '[ Failed ]' to be printed.
-    @type passed:   Any objects which evaluates to either True or False.
+    @param passed:  An argument which if True causes '[ OK ]' to be printed 
and if False causes '[ Failed ]' to be printed.
+    @type passed:   bool
+    @keyword width: The width of the line, excluding the terminal '[ OK ]' 
or '[ Failed ]'.
+    @type width:    int
     """
 
     # Name.
-    sys.stdout.write("    " + name + " ")
+    sys.stdout.write(name + " ")
 
     # Dots.
-    for j in xrange(84 - len(name)):
+    for j in xrange(width - len(name)):
         sys.stdout.write(".")
 
     # Passed.




Related Messages


Powered by MHonArc, Updated Tue Jan 04 12:20:02 2011