From: W. Trevor King Date: Wed, 29 Sep 2010 13:53:30 +0000 (-0400) Subject: Relax doctest constraints on hooke.util.fit.ModelFitter. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6efdc56a3ada04187ca0556bfff1ef507939950;p=hooke.git Relax doctest constraints on hooke.util.fit.ModelFitter. I'm not sure of the reason behind the differences, but sometimes the exit condition varies slightly depending on which test box I use. --- diff --git a/hooke/util/fit.py b/hooke/util/fit.py index 6d2e303..0a97135 100644 --- a/hooke/util/fit.py +++ b/hooke/util/fit.py @@ -89,10 +89,10 @@ class ModelFitter (object): >>> outqueue = Queue() >>> slope,offset = m.fit(outqueue=outqueue) >>> info = outqueue.get(block=False) - >>> pprint(info) # doctest: +ELLIPSIS, +REPORT_UDIFF + >>> pprint(info) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE, +REPORT_UDIFF {'active fitted parameters': array([ 6.999..., -32.889...]), 'active parameters': array([ 6.999..., -32.889...]), - 'convergence flag': 2, + 'convergence flag': ..., 'covariance matrix': array([[ 1.199...e-08, -5.993...e-06], [ -5.993...e-06, 3.994...e-03]]), 'data scale factor': 1.0, @@ -101,9 +101,9 @@ class ModelFitter (object): 'fvec': array([...]), 'ipvt': array([1, 2]), 'nfev': 7, - 'qtf': array([ 2.851...e-07, 1.992...e-06])}, + 'qtf': array([...])}, 'initial parameters': [6.992..., -33.0], - 'message': 'The relative error between two consecutive iterates is at most 0.000...', + 'message': '...relative error between two consecutive iterates is at most 0.000...', 'rescaled': False, 'scale': [0.100..., 6.123...]}