mailr19647 - in /trunk/test_suite/system_tests: __init__.py value.py


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

Header


Content

Posted by edward on May 03, 2013 - 19:18:
Author: bugman
Date: Fri May  3 19:18:42 2013
New Revision: 19647

URL: http://svn.gna.org/viewcvs/relax?rev=19647&view=rev
Log:
Created the new Value system test class with the first test 
Value.test_value_copy.

This test demonstrates some pretty large bugs in the value.copy user function.


Added:
    trunk/test_suite/system_tests/value.py
Modified:
    trunk/test_suite/system_tests/__init__.py

Modified: trunk/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/__init__.py?rev=19647&r1=19646&r2=19647&view=diff
==============================================================================
--- trunk/test_suite/system_tests/__init__.py (original)
+++ trunk/test_suite/system_tests/__init__.py Fri May  3 19:18:42 2013
@@ -64,6 +64,7 @@
 from test_suite.system_tests.state import State
 from test_suite.system_tests.structure import Structure
 from test_suite.system_tests.unit_vectors import Unit_vectors
+from test_suite.system_tests.value import Value
 
 
 __all__ = ['align_tensor',
@@ -98,7 +99,8 @@
            'sequence',
            'state',
            'structure',
-           'unit_vectors']
+           'unit_vectors',
+           'value']
 
 
 class System_test_runner:
@@ -186,6 +188,7 @@
             suite_array.append(TestLoader().loadTestsFromTestCase(State))
             suite_array.append(TestLoader().loadTestsFromTestCase(Structure))
             
suite_array.append(TestLoader().loadTestsFromTestCase(Unit_vectors))
+            suite_array.append(TestLoader().loadTestsFromTestCase(Value))
 
         # Group all tests together.
         full_suite = TestSuite(suite_array)

Added: trunk/test_suite/system_tests/value.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/value.py?rev=19647&view=auto
==============================================================================
--- trunk/test_suite/system_tests/value.py (added)
+++ trunk/test_suite/system_tests/value.py Fri May  3 19:18:42 2013
@@ -1,0 +1,56 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2013 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# 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 data_store import Relax_data_store; ds = Relax_data_store()
+from test_suite.system_tests.base_classes import SystemTestCase
+
+
+class Value(SystemTestCase):
+    """Class for testing various aspects specific to the value user 
functions."""
+
+    def setUp(self):
+        """Set up for all the functional tests."""
+
+        # Create the data pipe.
+        self.interpreter.pipe.create('mf', 'mf')
+
+
+    def test_value_copy(self):
+        """Test the value.copy user function."""
+
+        # Create a data pipe.
+        self.interpreter.pipe.create('orig', 'mf')
+
+        # Add some new spins.
+        self.interpreter.spin.create(mol_name='test mol', res_name='Gly', 
res_num=1, spin_name='N')
+        self.interpreter.spin.create(mol_name='test mol', res_name='Gly', 
res_num=2, spin_name='N')
+        self.interpreter.spin.create(mol_name='test mol', res_name='Gly', 
res_num=3, spin_name='N')
+
+        # Add some values.
+        self.interpreter.value.set(val=0.8, param='s2', spin_id=':1,2')
+
+        # Create a new data pipe.
+        self.interpreter.pipe.create('new', 'mf')
+
+        # Copy the sequence data and value.
+        self.interpreter.sequence.copy(pipe_from='orig', pipe_to='new')
+        self.interpreter.value.copy(pipe_from='orig', pipe_to='new', 
param='s2')




Related Messages


Powered by MHonArc, Updated Fri May 03 19:40:02 2013