mailr2862 - in /branches/test_suite: ./ test_suite/ test_suite/system_tests/ test_suite/unit_tests/


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

Header


Content

Posted by edward . dauvergne on November 21, 2006 - 04:47:
Author: bugman
Date: Tue Nov 21 04:47:13 2006
New Revision: 2862

URL: http://svn.gna.org/viewcvs/relax?rev=2862&view=rev
Log:
Execution of both the system/functional tests and unit tests when using the 
--test-suite option. 

Created the file 'test_suite/runner.py' for the execution of all categories 
of tests
(system/functional and unit tests).

Added an '__init__.py' file to the 'unit_tests' directory to allow import of 
the modules.

Renamed the file 'test_suite/system_tests/test_suite.py' to 
'test_suite/system_tests/main.py'.
More changes will be necessary to remove all references in the 
system/functional tests to the test
suite.


Added:
    branches/test_suite/test_suite/runner.py
    branches/test_suite/test_suite/system_tests/main.py
      - copied, changed from r2854, 
branches/test_suite/test_suite/system_tests/test_suite.py
    branches/test_suite/test_suite/unit_tests/__init__.py
      - copied, changed from r2854, branches/test_suite/test_suite/__init__.py
Removed:
    branches/test_suite/test_suite/system_tests/test_suite.py
Modified:
    branches/test_suite/relax
    branches/test_suite/test_suite/__init__.py
    branches/test_suite/test_suite/system_tests/__init__.py

Modified: branches/test_suite/relax
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/relax?rev=2862&r1=2861&r2=2862&view=diff
==============================================================================
--- branches/test_suite/relax (original)
+++ branches/test_suite/relax Tue Nov 21 04:47:13 2006
@@ -75,7 +75,7 @@
 from prompt.interpreter import Interpreter
 from specific_fns.main import Specific
 from specific_fns.specific_setup import Specific_setup
-from test_suite.system_tests.test_suite import Test_suite
+from test_suite.runner import Test_suite_runner
 from thread_classes import Threading, ThreadData
 import version
 
@@ -192,7 +192,7 @@
             self.interpreter._on()
 
             # Run the tests.
-            Test_suite(self)
+            Test_suite_runner(self)
 
         # Test mode.
         elif mode == 'test':

Modified: branches/test_suite/test_suite/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/test_suite/__init__.py?rev=2862&r1=2861&r2=2862&view=diff
==============================================================================
--- branches/test_suite/test_suite/__init__.py (original)
+++ branches/test_suite/test_suite/__init__.py Tue Nov 21 04:47:13 2006
@@ -21,6 +21,7 @@
 
###############################################################################
 
 
-__all__ = ['system_tests',
+__all__ = ['runner',
+           'system_tests',
            'unit_tests']
 

Added: branches/test_suite/test_suite/runner.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/test_suite/runner.py?rev=2862&view=auto
==============================================================================
--- branches/test_suite/test_suite/runner.py (added)
+++ branches/test_suite/test_suite/runner.py Tue Nov 21 04:47:13 2006
@@ -1,0 +1,65 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2006 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  
 #
+#                                                                            
 #
+###############################################################################
+
+# Import the test suite categories.
+from system_tests.main import System_tests
+from unit_tests.unit_test_runner import run_unit_tests
+
+
+class Test_suite_runner:
+    """Class for running all components of the relax test suite.
+
+    This currently includes the following categories of tests:
+        System/functional tests.
+        Unit tests.
+    """
+
+    def __init__(self, relax):
+        """Run the system/functional and unit test suite components.
+
+        @param relax:   The relax namespace.
+        @type relax:    instance
+        """
+
+        self.relax = relax
+
+        # Execute the system/functional tests.
+        system_result = System_tests(self.relax)
+
+        # Execute the unit tests.
+        runner = run_unit_tests()
+        unit_result = runner.run()
+
+        # Print out a summary of the test suite.
+        ########################################
+
+        # Heading.
+        print "\n\n\n"
+        print "###################################"
+        print "# Summary of the relax test suite #"
+        print "###################################"
+
+        # System/functional tests.
+        print "System/functional tests: " + `system_result`
+
+        # Unit tests.
+        print "Unit tests: " + `unit_result`

Modified: branches/test_suite/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/test_suite/system_tests/__init__.py?rev=2862&r1=2861&r2=2862&view=diff
==============================================================================
--- branches/test_suite/test_suite/system_tests/__init__.py (original)
+++ branches/test_suite/test_suite/system_tests/__init__.py Tue Nov 21 
04:47:13 2006
@@ -21,11 +21,13 @@
 
###############################################################################
 
 
-__all__ = ['test_suite',
+__all__ = ['angles',
            'diffusion_tensor',
            'generic.py',
            'jw_mapping',
+           'main',
            'model_free',
+           'model_selection',
            'relax_fit',
            'run_create',
            'sequence']

Copied: branches/test_suite/test_suite/system_tests/main.py (from r2854, 
branches/test_suite/test_suite/system_tests/test_suite.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/test_suite/system_tests/main.py?p2=branches/test_suite/test_suite/system_tests/main.py&p1=branches/test_suite/test_suite/system_tests/test_suite.py&r1=2854&r2=2862&rev=2862&view=diff
==============================================================================
--- branches/test_suite/test_suite/system_tests/test_suite.py (original)
+++ branches/test_suite/test_suite/system_tests/main.py Tue Nov 21 04:47:13 
2006
@@ -37,9 +37,11 @@
 from sequence import Sequence
 
 
-class Test_suite:
+class System_tests:
+    """The system/functional tests component of the relax test suite."""
+
     def __init__(self, relax):
-        """The relax test suite.
+        """The relax system/functional tests.
 
         This class runs a number of tests to determine if any changes to 
relax have caused
         breakages.

Copied: branches/test_suite/test_suite/unit_tests/__init__.py (from r2854, 
branches/test_suite/test_suite/__init__.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/test_suite/test_suite/unit_tests/__init__.py?p2=branches/test_suite/test_suite/unit_tests/__init__.py&p1=branches/test_suite/test_suite/__init__.py&r1=2854&r2=2862&rev=2862&view=diff
==============================================================================
--- branches/test_suite/test_suite/__init__.py (original)
+++ branches/test_suite/test_suite/unit_tests/__init__.py Tue Nov 21 04:47:13 
2006
@@ -21,6 +21,5 @@
 
###############################################################################
 
 
-__all__ = ['system_tests',
-           'unit_tests']
-
+__all__ = ['test_float',
+           'unit_test_runner']




Related Messages


Powered by MHonArc, Updated Tue Nov 21 13:00:07 2006