Package test_suite :: Package system_tests :: Module mol_res_spin
[hide private]
[frames] | no frames]

Source Code for Module test_suite.system_tests.mol_res_spin

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2012 Edward d'Auvergne                                        # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """System tests of the molecule, residue, and spin sequence operators.""" 
24   
25   
26  # Python module imports. 
27  from os import sep 
28   
29  # relax module imports. 
30  from data import Relax_data_store; ds = Relax_data_store() 
31  from status import Status; status = Status() 
32  from test_suite.system_tests.base_classes import SystemTestCase 
33   
34   
35 -class Mol_res_spin(SystemTestCase):
36 """Class for testing the mol_res_spin functions.""" 37
38 - def setUp(self):
39 """Set up for all the functional tests.""" 40 41 # Create the data pipe. 42 self.interpreter.pipe.create('mf', 'mf')
43 44
45 - def test_residue_delete(self):
46 """Test residue deletion.""" 47 48 # Read a PDB file. 49 self.interpreter.structure.read_pdb(file='sphere.pdb', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'sphere') 50 51 # Load the spins. 52 self.interpreter.structure.load_spins() 53 54 # Test the original sequence data. 55 self.assertEqual(len(cdp.mol), 1) 56 self.assertEqual(len(cdp.mol[0].res), 9) 57 58 # Delete the first residue. 59 self.interpreter.residue.delete(res_id='#sphere_mol1:1') 60 61 # Test the remaining sequence data. 62 self.assertEqual(len(cdp.mol), 1) 63 self.assertEqual(len(cdp.mol[0].res), 8)
64