Author: bugman Date: Thu Apr 10 14:38:03 2008 New Revision: 5552 URL: http://svn.gna.org/viewcvs/relax?rev=5552&view=rev Log: Fixes for the symmetry and force arg unit tests of the structure.create_vector_dist() user function. These should now be bools. 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=5552&r1=5551&r2=5552&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_structure.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_structure.py Thu Apr 10 14:38:03 2008 @@ -106,43 +106,43 @@ self.assertRaises(RelaxFloatError, self.structure_fns.create_vector_dist, length=data[1]) + def test_create_vector_dist_argfail_file(self): + """The file arg test of the structure.create_vector_dist() 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.create_vector_dist, file=data[1]) + + + def test_create_vector_dist_argfail_dir(self): + """The dir arg test of the structure.create_vector_dist() 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.create_vector_dist, dir=data[1]) + + def test_create_vector_dist_argfail_symmetry(self): """The symmetry arg test of the structure.create_vector_dist() user function.""" # Loop over the data types. for data in DATA_TYPES: - # Catch the bin arguments, and skip them. - if data[0] == 'bin': - continue - - # The argument test. - self.assertRaises(RelaxBinError, self.structure_fns.create_vector_dist, symmetry=data[1]) - - - def test_create_vector_dist_argfail_file(self): - """The file arg test of the structure.create_vector_dist() 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.create_vector_dist, file=data[1]) - - - def test_create_vector_dist_argfail_dir(self): - """The dir arg test of the structure.create_vector_dist() 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.create_vector_dist, dir=data[1]) + # Catch the bool arguments, and skip them. + if data[0] == 'bool': + continue + + # The argument test. + self.assertRaises(RelaxBoolError, self.structure_fns.create_vector_dist, symmetry=data[1]) def test_create_vector_dist_argfail_force(self): @@ -150,12 +150,12 @@ # Loop over the data types. for data in DATA_TYPES: - # Catch the bin arguments, and skip them. - if data[0] == 'bin': - continue - - # The argument test. - self.assertRaises(RelaxBinError, self.structure_fns.create_vector_dist, force=data[1]) + # Catch the bool arguments, and skip them. + if data[0] == 'bool': + continue + + # The argument test. + self.assertRaises(RelaxBoolError, self.structure_fns.create_vector_dist, force=data[1]) def test_load_spins_argfail_spin_id(self):