mailr18701 - /trunk/test_suite/unit_tests/_lib/_text/test_table.py


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

Header


Content

Posted by edward on March 08, 2013 - 15:15:
Author: bugman
Date: Fri Mar  8 15:15:27 2013
New Revision: 18701

URL: http://svn.gna.org/viewcvs/relax?rev=18701&view=rev
Log:
Modified the test_format_table4() unit test of lib.text.table.format_table().

This change is to test the currently unimplemented custom_format argument.  
This will be used to
allow special formatting in the table.  For example using '%.3f' for a float.


Modified:
    trunk/test_suite/unit_tests/_lib/_text/test_table.py

Modified: trunk/test_suite/unit_tests/_lib/_text/test_table.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_text/test_table.py?rev=18701&r1=18700&r2=18701&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_lib/_text/test_table.py (original)
+++ trunk/test_suite/unit_tests/_lib/_text/test_table.py Fri Mar  8 15:15:27 
2013
@@ -175,12 +175,12 @@
             ['Column 1', 'Column 2', 'Column 3', 'Column 4']
         ]
         contents = [
-            ['A', 2, 3.456, list],
-            ['B', 2, 4.567, 1e-6]
-        ]
-
-        # Create the table.
-        table = format_table(headings=headings, contents=contents, 
spacing=True)
+            ['A', 2, 3.4561234124, list],
+            ['B', 2, 4.567745674, 1e-6]
+        ]
+
+        # Create the table.
+        table = format_table(headings=headings, contents=contents, 
spacing=True, custom_format=[None, None, '%.3f', None])
         table_lines = table.split('\n')
 
         # The true table.




Related Messages


Powered by MHonArc, Updated Fri Mar 08 15:20:03 2013