mailr4325 - in /1.3/test_suite: relax_test_runner.py runner.py


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

Header


Content

Posted by edward on January 04, 2008 - 17:26:
Author: bugman
Date: Fri Jan  4 17:26:07 2008
New Revision: 4325

URL: http://svn.gna.org/viewcvs/relax?rev=4325&view=rev
Log:
Created the framework for a new unittest runner to replace TextTestRunner.

The point it to capture STDOUT during each test and only print it in the 
reports for failures and
errors.


Added:
    1.3/test_suite/relax_test_runner.py
Modified:
    1.3/test_suite/runner.py

Added: 1.3/test_suite/relax_test_runner.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/relax_test_runner.py?rev=4325&view=auto
==============================================================================
--- 1.3/test_suite/relax_test_runner.py (added)
+++ 1.3/test_suite/relax_test_runner.py Fri Jan  4 17:26:07 2008
@@ -1,0 +1,32 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Python module imports.
+from unittest import TextTestRunner
+
+
+class RelaxTestRunner(TextTestRunner):
+    """A replacement unittest runner.
+
+    This runner is designed to catch STDOUT during the execution of each 
test and to prepend the
+    output to the failure and error reports normally generated by 
TextTestRunner.
+    """

Modified: 1.3/test_suite/runner.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/runner.py?rev=4325&r1=4324&r2=4325&view=diff
==============================================================================
--- 1.3/test_suite/runner.py (original)
+++ 1.3/test_suite/runner.py Fri Jan  4 17:26:07 2008
@@ -27,6 +27,9 @@
 from system_tests.main import System_tests
 from unit_tests.unit_test_runner import Unit_test_runner
 
+# relax module imports.
+from relax_test_runner import RelaxTestRunner
+
 
 class Test_suite_runner:
     """Class for running all components of the relax test suite.
@@ -51,7 +54,7 @@
 
         # Execute the unit tests.
         unit_runner = Unit_test_runner(root_path='test_suite/unit_tests')
-        unit_result = unit_runner.run()
+        unit_result = unit_runner.run(runner=RelaxTestRunner())
 
         # Print out a summary of the test suite.
         ########################################




Related Messages


Powered by MHonArc, Updated Fri Jan 04 17:40:14 2008