mailr3425 - /1.3/test_suite/unit_tests/generic_fns/test_molecule.py


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

Header


Content

Posted by edward on November 04, 2007 - 18:18:
Author: bugman
Date: Sun Nov  4 18:14:20 2007
New Revision: 3425

URL: http://svn.gna.org/viewcvs/relax?rev=3425&view=rev
Log:
Added a unit test to test the failure of copying molecule data to a 
non-existent data pipe.


Modified:
    1.3/test_suite/unit_tests/generic_fns/test_molecule.py

Modified: 1.3/test_suite/unit_tests/generic_fns/test_molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/generic_fns/test_molecule.py?rev=3425&r1=3424&r2=3425&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/generic_fns/test_molecule.py (original)
+++ 1.3/test_suite/unit_tests/generic_fns/test_molecule.py Sun Nov  4 
18:14:20 2007
@@ -26,7 +26,7 @@
 # relax module imports.
 from data import Data as relax_data_store
 from generic_fns import molecule, residue
-from relax_errors import RelaxError
+from relax_errors import RelaxError, RelaxNoPipeError
 
 
 
@@ -118,6 +118,22 @@
         self.assertEqual(relax_data_store['test'].mol[1].res[0].spin[0].x, 1)
 
 
+    def test_copy_between_pipes_fail_no_pipe(self):
+        """Test the failure of copying of the molecule data between 
different data pipes.
+
+        The function used is generic_fns.molecule.copy().
+        """
+
+        # Create the first molecule and residue and add some data to its 
spin container.
+        molecule.create('Old mol')
+        residue.create(1, 'Ala')
+        relax_data_store['orig'].mol[0].res[0].spin[0].num = 111
+        relax_data_store['orig'].mol[0].res[0].spin[0].x = 1
+
+        # Copy the molecule to the second data pipe.
+        self.assertRaises(RelaxNoPipeError, molecule.copy, mol_from='#Old 
mol', pipe_to='test2')
+
+
     def test_creation(self):
         """Test the creation of a molecule data structure.
 




Related Messages


Powered by MHonArc, Updated Sun Nov 04 18:20:21 2007