mailr24975 - /branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py


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

Header


Content

Posted by tlinnet on August 11, 2014 - 09:09:
Author: tlinnet
Date: Mon Aug 11 09:09:14 2014
New Revision: 24975

URL: http://svn.gna.org/viewcvs/relax?rev=24975&view=rev
Log:
Added initial unit test class for testing 
specific_analysis.relax_disp.variables.

There will be more tests added, when a nesting slection function has been 
written here.

sr #3135(https://gna.org/support/?3135): Optimisation of the R1 relaxation 
rate for the off-resonance R1rho relaxation dispersion models.

Added:
    
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py

Added: 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py?rev=24975&view=auto
==============================================================================
--- 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  (added)
+++ 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  Mon Aug 11 09:09:14 2014
@@ -0,0 +1,40 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2014 Troels E. Linnet                                        
 #
+#                                                                            
 #
+# This file is part of the program relax (http://www.nmr-relax.com).         
 #
+#                                                                            
 #
+# This program 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 3 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.      
 #
+#                                                                            
 #
+###############################################################################
+
+# relax module imports.
+from specific_analyses.relax_disp.variables import MODEL_CR72
+from specific_analyses.relax_disp.variables import MODEL_PARAMS
+from test_suite.unit_tests.base_classes import UnitTestCase
+
+
+class Test_variables(UnitTestCase):
+    """Unit tests for the functions of the 
specific_analyses.relax_disp.variables module."""
+
+
+    def test_MODEL_PARAMS(self):
+        """Unit test of the MODEL_PARAM dictionary."""
+
+        # Test parameter return from model parameter dictionary.
+        params_cr72 = MODEL_PARAMS[MODEL_CR72]
+
+        # Test the return.
+        self.assertEqual(params_cr72, ['r2', 'pA', 'dw', 'kex'])
+




Related Messages


Powered by MHonArc, Updated Mon Aug 11 09:20:05 2014