Author: bugman Date: Fri Aug 5 09:21:58 2011 New Revision: 14161 URL: http://svn.gna.org/viewcvs/relax?rev=14161&view=rev Log: Better testing of the new diff_tensor_grid_inc arg to the dauvergne_protocol auto-analysis. Modified: branches/gui_testing/auto_analyses/dauvergne_protocol.py Modified: branches/gui_testing/auto_analyses/dauvergne_protocol.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/auto_analyses/dauvergne_protocol.py?rev=14161&r1=14160&r2=14161&view=diff ============================================================================== --- branches/gui_testing/auto_analyses/dauvergne_protocol.py (original) +++ branches/gui_testing/auto_analyses/dauvergne_protocol.py Fri Aug 5 09:21:58 2011 @@ -277,16 +277,11 @@ raise RelaxError("The grid_inc user variable '%s' is incorrectly set. It should be an integer." % self.grid_inc) if not isinstance(self.diff_tensor_grid_inc, dict): raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should be a dictionary." % self.diff_tensor_grid_inc) - if not self.diff_tensor_grid_inc.has_key('sphere'): - raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the 'sphere' key." % self.diff_tensor_grid_inc) - if not isinstance(self.diff_tensor_grid_inc, dict): - raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the 'sphere' key." % self.diff_tensor_grid_inc) - if not self.diff_tensor_grid_inc.has_key('prolate'): - raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the 'prolate' key." % self.diff_tensor_grid_inc) - if not self.diff_tensor_grid_inc.has_key('oblate'): - raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the 'oblate' key." % self.diff_tensor_grid_inc) - if not self.diff_tensor_grid_inc.has_key('ellipsoid'): - raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the 'ellipsoid' key." % self.diff_tensor_grid_inc) + for tensor in ['sphere', 'prolate', 'oblate', 'ellipsoid']: + if not self.diff_tensor_grid_inc.has_key(tensor): + raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. It should contain the '%s' key." % (self.diff_tensor_grid_inc, tensor)) + if not isinstance(self.diff_tensor_grid_inc[tensor], int): + raise RelaxError("The diff_tensor_grid_inc user variable '%s' is incorrectly set. The value corresponding to the key '%s' should be an integer." % (self.diff_tensor_grid_inc, tensor)) if not isinstance(self.min_algor, str): raise RelaxError("The min_algor user variable '%s' is incorrectly set. It should be a string." % self.min_algor) if not isinstance(self.mc_sim_num, int):