Author: bugman Date: Fri Aug 22 11:24:38 2014 New Revision: 25200 URL: http://svn.gna.org/viewcvs/relax?rev=25200&view=rev Log: Created the Structure.test_create_diff_tensor_pdb2 system test. This is to catch another situation leading to bug #22505 (https://gna.org/bugs/?22505), the failure of the structure.create_diff_tensor_pdb user function when no structural data is present. Modified: trunk/test_suite/system_tests/structure.py Modified: trunk/test_suite/system_tests/structure.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/structure.py?rev=25200&r1=25199&r2=25200&view=diff ============================================================================== --- trunk/test_suite/system_tests/structure.py (original) +++ trunk/test_suite/system_tests/structure.py Fri Aug 22 11:24:38 2014 @@ -245,6 +245,39 @@ def test_create_diff_tensor_pdb(self): """Test the deletion of non-existent structural data.""" + + # Delete all structural data. + self.interpreter.structure.delete() + + # Set up a diffusion tensor. + self.interpreter.diffusion_tensor.init((8.5e-9, 1.1, 20.0, 20.0), param_types=2) + + # Create the PDB representation. + self.interpreter.structure.create_diff_tensor_pdb(scale=1.8e-06, file='prolate.pdb', dir=ds.tmpdir, force=True) + + + def test_create_diff_tensor_pdb(self): + """Test the creation of the diffusion tensor PDB representation.""" + + # Delete all structural data. + self.interpreter.structure.delete() + + # Set up a diffusion tensor. + self.interpreter.diffusion_tensor.init((8.5e-9, 1.1, 20.0, 20.0), param_types=2) + + # Create the PDB representation. + self.interpreter.structure.create_diff_tensor_pdb(scale=1.8e-06, file='prolate.pdb', dir=ds.tmpdir, force=True) + + + def test_create_diff_tensor_pdb2(self): + """Test the creation of the diffusion tensor PDB representation, after deleting structural data.""" + + # Path of the files. + path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures'+sep+'lactose' + + # Read the PDBs. + self.interpreter.structure.read_pdb(file='lactose_MCMM4_S1_1.pdb', dir=path, set_mol_name='L1') + self.interpreter.structure.read_pdb(file='lactose_MCMM4_S1_2.pdb', dir=path, set_mol_name='L2') # Delete all structural data. self.interpreter.structure.delete()