Author: bugman Date: Fri Apr 4 15:10:44 2008 New Revision: 5300 URL: http://svn.gna.org/viewcvs/relax?rev=5300&view=rev Log: Added 2 unit tests for the new args of the structure.read_pdb() user function. Modified: 1.3/test_suite/unit_tests/_prompt/test_structure.py Modified: 1.3/test_suite/unit_tests/_prompt/test_structure.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_structure.py?rev=5300&r1=5299&r2=5300&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_structure.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_structure.py Fri Apr 4 15:10:44 2008 @@ -197,6 +197,20 @@ self.assertRaises(RelaxNoneIntError, self.structure_fns.read_pdb, file='test.pdb', model=data[1]) + def test_read_pdb_argfail_parser(self): + """The parser arg test of the structure.read_pdb() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the str arguments, and skip them. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.structure_fns.read_pdb, parser=data[1]) + + + def test_read_pdb_argfail_load_seq(self): """The load_seq arg test of the structure.read_pdb() user function.""" @@ -210,6 +224,19 @@ self.assertRaises(RelaxBoolError, self.structure_fns.read_pdb, file='test.pdb', load_seq=data[1]) + def test_read_pdb_argfail_spin_id(self): + """The spin_id arg test of the structure.read_pdb() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the None and str arguments, and skip them. + if data[0] == 'None' or data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxNoneStrError, self.structure_fns.read_pdb, file='test.pdb', spin_id=data[1]) + + def test_vectors_argfail_heteronuc(self): """The heteronuc arg test of the structure.vectors() user function."""