mailr4061 - /1.3/test_suite/unit_tests/relax_data_testing_base.py


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

Header


Content

Posted by edward on November 26, 2007 - 19:35:
Author: bugman
Date: Mon Nov 26 19:35:34 2007
New Revision: 4061

URL: http://svn.gna.org/viewcvs/relax?rev=4061&view=rev
Log:
Added the base class framework for testing the relaxation data modules.


Added:
    1.3/test_suite/unit_tests/relax_data_testing_base.py

Added: 1.3/test_suite/unit_tests/relax_data_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/relax_data_testing_base.py?rev=4061&view=auto
==============================================================================
--- 1.3/test_suite/unit_tests/relax_data_testing_base.py (added)
+++ 1.3/test_suite/unit_tests/relax_data_testing_base.py Mon Nov 26 19:35:34 
2007
@@ -1,0 +1,56 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2007 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  
 #
+#                                                                            
 #
+###############################################################################
+
+# relax module imports.
+from data import Data as relax_data_store
+from relax_errors import RelaxError
+
+
+
+class Relax_data_base_class:
+    """Base class for the tests of the relaxation data tensor modules.
+
+    This includes both the 'prompt.relax_data' and 'generic_fns.relax_data' 
modules.
+    The base class also contains many shared unit tests.
+    """
+
+
+    def setUp(self):
+        """Set up for all the relaxation data unit tests."""
+
+        # Reset the relax data storage object.
+        relax_data_store.__reset__()
+
+        # Add a data pipe to the data store.
+        relax_data_store.add(pipe_name='orig', pipe_type='mf')
+
+        # Add a second data pipe for copying tests.
+        relax_data_store.add(pipe_name='test', pipe_type='mf')
+
+        # Set the current data pipe to 'orig'.
+        relax_data_store.current_pipe = 'orig'
+
+
+    def tearDown(self):
+        """Reset the relax data storage object."""
+
+        relax_data_store.__reset__()




Related Messages


Powered by MHonArc, Updated Mon Nov 26 19:40:13 2007