mailr18121 - /trunk/test_suite/system_tests/align_tensor.py


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

Header


Content

Posted by edward on December 12, 2012 - 09:50:
Author: bugman
Date: Wed Dec 12 09:50:49 2012
New Revision: 18121

URL: http://svn.gna.org/viewcvs/relax?rev=18121&view=rev
Log:
Created the Align_tensor.test_fix() system test to check the operation of 
align_tensor.fix.


Modified:
    trunk/test_suite/system_tests/align_tensor.py

Modified: trunk/test_suite/system_tests/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/align_tensor.py?rev=18121&r1=18120&r2=18121&view=diff
==============================================================================
--- trunk/test_suite/system_tests/align_tensor.py (original)
+++ trunk/test_suite/system_tests/align_tensor.py Wed Dec 12 09:50:49 2012
@@ -104,6 +104,23 @@
         self.assertEqual(cdp.align_tensors[1].name, 'new')
 
 
+    def test_fix(self):
+        """Test the align_tensor.fix user function."""
+
+        # Fix all tensors.
+        self.interpreter.align_tensor.fix()
+
+        # Unfix one tensor.
+        self.interpreter.align_tensor.fix('2 full', fixed=False)
+
+        # Check the fixed flags.
+        flags = [True]*10
+        flags[4] = False
+        for i in range(10):
+            print("Checking the tensor %s: '%s'." % (i, 
cdp.align_tensors[i].name))
+            self.assertEqual(cdp.align_tensors[i].fixed, flags[i])
+
+
     def test_to_and_from_xml(self):
         """Test the conversion to and from XML."""
 




Related Messages


Powered by MHonArc, Updated Wed Dec 12 10:00:01 2012