Author: bugman Date: Sun Apr 20 18:57:16 2008 New Revision: 5861 URL: http://svn.gna.org/viewcvs/relax?rev=5861&view=rev Log: Added a unit test for the Scientific_data.atom_loop() method. Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py?rev=5861&r1=5860&r2=5861&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py (original) +++ 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py Sun Apr 20 18:57:16 2008 @@ -57,6 +57,21 @@ relax_data_store.__reset__() + def test_atom_loop(self): + """Test the Scientific_data.atom_loop() method.""" + + # Load the PDB file. + self.data.load_structures(self.test_pdb_path) + + # Loop over the atoms. + atom_count = 0 + for atom in self.data.atom_loop(): + atom_count = atom_count + 1 + + # Test the number of atoms looped over. + self.assertEqual(atom_count, 174) + + def test_load_structures(self): """Load a PDB file using Scientific_data.load_structures()."""