Hi Edward.

If I convert to:
self.assertRaises(RelaxError,
self.interpreter.minimise.grid_search(inc=GRID_INC) )

I get:

R1rho at 900.2 MHz, for offset=141.010 ppm and dispersion point 1500.0,
with 1 time points.
Traceback (most recent call last):
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/test_suite/system_tests/relax_disp.py",
line 1753, in test_bug_atul_srivastava
    self.assertRaises(RelaxError,
self.interpreter.minimise.grid_search(inc=GRID_INC) )
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/prompt/uf_objects.py",
line 226, in __call__
    self._backend(*new_args, **uf_kargs)
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/pipe_control/minimise.py",
line 213, in grid_search
    api.grid_search(lower=model_lower, upper=model_upper, inc=model_inc,
scaling_matrix=scaling_matrix, constraints=constraints, verbosity=verbosity)
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/specific_analyses/relax_disp/api.py",
line 622, in grid_search
    self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc,
scaling_matrix=scaling_matrix, constraints=constraints,
verbosity=verbosity, sim_index=sim_index)
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/specific_analyses/relax_disp/api.py",
line 813, in minimise
    minimise_r2eff(spins=spins, spin_ids=spin_ids, min_algor=min_algor,
min_options=min_options, func_tol=func_tol, grad_tol=grad_tol,
max_iterations=max_iterations, constraints=constraints,
scaling_matrix=scaling_matrix[model_index], verbosity=verbosity,
sim_index=sim_index, lower=lower_i, upper=upper_i, inc=inc_i)
  File
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/specific_analyses/relax_disp/optimisation.py",
line 402, in minimise_r2eff
    raise RelaxError("The data setup points to exponential curve fitting,
but only %i time points was found, where 3 time points is minimum.  If
calculating R2eff values for fixed relaxation time period data, check that
a reference intensity has been specified for each offset
value."%(len(times)))
RelaxError: RelaxError: The data setup points to exponential curve fitting,
but only 1 time points was found, where 3 time points is minimum.  If
calculating R2eff values for fixed relaxation time period data, check that
a reference intensity has been specified for each offset value.


So, I guess this does not work.

best
Troels

2014-10-13 17:47 GMT+02:00 Edward d'Auvergne <edw...@nmr-relax.com>:

> Hi Troels,
>
> We shouldn't skip tests due to different versions of mandatory
> dependencies - in this case Python.  This test skipping infrastructure
> is only for skipping tests for the optional Python packages and
> external software.  I've been trying to work out why the 'with'
> statements have been used.  For example one case is:
>
>                 with self.assertRaises(RelaxError):
>                     self.interpreter.minimise.grid_search(inc=GRID_INC)
>
> Is there a reason why this does not use the standard notation of:
>
>                 self.assertRaises(RelaxError,
> self.interpreter.minimise.grid_search, inc=GRID_INC)
>
> This is used everywhere else:
>
> $ grep self.assertRaises -r test_suite
>
> If there is no specific reason, then the 3 instances can be converted
> to the standard notation and then the test would work on earlier
> Python versions.
>
> Cheers,
>
> Edward
>
>
>
>
>
>
>
>
>
> On 13 October 2014 17:19,  <tlin...@nmr-relax.com> wrote:
> > Author: tlinnet
> > Date: Mon Oct 13 17:19:00 2014
> > New Revision: 26260
> >
> > URL: http://svn.gna.org/viewcvs/relax?rev=26260&view=rev
> > Log:
> > Fix for testing the raise of expected errors in systemtests.
> >
> > The systemtest will not be tested, if python version is under version
> 2.7.
> >
> > Bug #22801 (https://gna.org/bugs/?22801): Failure of the relax test
> suite on Python 2.5.
> >
> > Modified:
> >     trunk/test_suite/system_tests/relax_disp.py
> >
> > Modified: trunk/test_suite/system_tests/relax_disp.py
> > URL:
> http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=26260&r1=26259&r2=26260&view=diff
> >
> ==============================================================================
> > --- trunk/test_suite/system_tests/relax_disp.py (original)
> > +++ trunk/test_suite/system_tests/relax_disp.py Mon Oct 13 17:19:00 2014
> > @@ -27,6 +27,7 @@
> >  from minfx.generic import generic_minimise
> >  from random import gauss
> >  import re, math
> > +from sys import version_info
> >  from tempfile import mkdtemp, NamedTemporaryFile
> >
> >
> > @@ -140,6 +141,18 @@
> >              # Store in the status object.
> >              if methodName in to_skip:
> >                  status.skipped_tests.append([methodName, 'matplotlib
> module', self._skip_type])
> > +
> > +        # If not python 2.7, bug #22801 (https://gna.org/bugs/?22801):
> Failure of the relax test suite on Python 2.5.
> > +        # It is not possible to call: with self.assertRaises() before
> version 2.7
> > +        if not version_info >= (2,7):
> > +            # The list of tests to skip.
> > +            to_skip = [
> > +                "test_bug_atul_srivastava"
> > +            ]
> > +
> > +            # Store in the status object.
> > +            if methodName in to_skip:
> > +                status.skipped_tests.append([methodName, 'python 2.7',
> self._skip_type])
> >
> >
> >      def setUp(self):
> >
> >
> > _______________________________________________
> > relax (http://www.nmr-relax.com)
> >
> > This is the relax-commits mailing list
> > relax-comm...@gna.org
> >
> > To unsubscribe from this list, get a password
> > reminder, or change your subscription options,
> > visit the list information page at
> > https://mail.gna.org/listinfo/relax-commits
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-devel mailing list
> relax-devel@gna.org
>
> To unsubscribe from this list, get a password
> reminder, or change your subscription options,
> visit the list information page at
> https://mail.gna.org/listinfo/relax-devel
>
_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to