User Tools

Site Tools


reports:74fa0e8

Test executed on commit 74fa0e8520a032eb6e3fbc4391f6d5372c4a861b

Test Report

Report generated on 17-Jun-2016 at 15:17:51

Environment

Platform Linux-3.16.0-70-generic-x86_64-with-debian-jessie-sid
Python 2.7.11

Summary

9 tests ran in 109.34 seconds.
8 passed, 0 skipped, 1 failed, 0 errors.
0 expected failures, 0 unexpected passes.

Results

Result Test Duration Links
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_j_estimators 0.00
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_j_blue_estimators 0.98
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_last_line_interactions 0.00
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_nubar_estimators 0.00
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_ws 0.00
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_luminosity_inner 0.00
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_spectrum 0.93
No log output captured.
Passed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_montecarlo_properties 0.02
No log output captured.
Failed lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_shell_temperature 0.22
self = <tardis.tests.tests_slow.test_w7.TestW7 object at 0x7f22ad513810>
plot_object = <tardis.tests.tests_slow.plot_helpers.PlotUploader object at 0x7f22ad513890>

def test_shell_temperature(self, plot_object):
plot_object.add(self.plot_t_rads(), "t_rads")

assert_quantity_allclose(
self.reference['t_rads'],
> self.result.t_rads)

tardis/tests/tests_slow/test_w7.py:171:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/astropy/tests/helper.py:632: in assert_quantity_allclose
**kwargs)
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose
verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

comparison = <function compare at 0x7f22ad1e0410>
x = array([ 10936.03215232, 9788.11770588, 8946.48415051, 8825.42125351,
...11, 6419.6473306 ,
6243.73184199, 6175.04411592, 6130.64885705])
y = array([ 10936.03215232, 9883.11770588, 9136.48415051, 9110.42125351,
...11, 8604.6473306 ,
8523.73184199, 8550.04411592, 8600.64885705])
err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6

def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
header='', precision=6):
from numpy.core import array, isnan, isinf, any, all, inf
x = array(x, copy=False, subok=True)
y = array(y, copy=False, subok=True)

def safe_comparison(*args, **kwargs):
# There are a number of cases where comparing two arrays hits special
# cases in array_richcompare, specifically around strings and void
# dtypes. Basically, we just can't do comparisons involving these
# types, unless both arrays have exactly the *same* type. So
# e.g. you can apply == to two string arrays, or two arrays with
# identical structured dtypes. But if you compare a non-string array
# to a string array, or two arrays with non-identical structured
# dtypes, or anything like that, then internally stuff blows up.
# Currently, when things blow up, we just return a scalar False or
# True. But we also emit a DeprecationWarning, b/c eventually we
# should raise an error here. (Ideally we might even make this work
# properly, but since that will require rewriting a bunch of how
# ufuncs work then we are not counting on that.)
#
# The point of this little function is to let the DeprecationWarning
# pass (or maybe eventually catch the errors and return False, I
# dunno, that's a little trickier and we can figure that out when the
# time comes).
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
return comparison(*args, **kwargs)

def isnumber(x):
return x.dtype.char in '?bhilqpBHILQPefdgFDG'

def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
raise AssertionError(msg)

try:
cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
if not cond:
msg = build_err_msg([x, y],
err_msg
+ '\n(shapes %s, %s mismatch)' % (x.shape,
y.shape),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
raise AssertionError(msg)

if isnumber(x) and isnumber(y):
x_isnan, y_isnan = isnan(x), isnan(y)
x_isinf, y_isinf = isinf(x), isinf(y)

# Validate that the special values are in the same place
if any(x_isnan) or any(y_isnan):
chk_same_position(x_isnan, y_isnan, hasval='nan')
if any(x_isinf) or any(y_isinf):
# Check +inf and -inf separately, since they are different
chk_same_position(x == +inf, y == +inf, hasval='+inf')
chk_same_position(x == -inf, y == -inf, hasval='-inf')

# Combine all the special values
x_id, y_id = x_isnan, y_isnan
x_id |= x_isinf
y_id |= y_isinf

# Only do the comparison if actual values are left
if all(x_id):
return

if any(x_id):
val = safe_comparison(x[~x_id], y[~y_id])
else:
val = safe_comparison(x, y)
else:
val = safe_comparison(x, y)

if isinstance(val, bool):
cond = val
reduced = [0]
else:
reduced = val.ravel()
cond = reduced.all()
reduced = reduced.tolist()
if not cond:
match = 100-100.0*reduced.count(1)/len(reduced)
msg = build_err_msg([x, y],
err_msg
+ '\n(mismatch %s%%)' % (match,),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
> raise AssertionError(msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E (mismatch 96.2962962963%)
E x: array([ 10936.032152, 9788.117706, 8946.484151, 8825.421254,
E 8494.998072, 8397.837712, 8203.655887, 8347.992354,
E 8141.21192 , 7953.031243, 7707.324676, 7634.898159,...
E y: array([ 10936.032152, 9883.117706, 9136.484151, 9110.421254,
E 8874.998072, 8872.837712, 8773.655887, 9012.992354,
E 8901.21192 , 8808.031243, 8657.324676, 8679.898159,...

/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError

reports/74fa0e8.txt · Last modified: 2016/06/17 11:47 by karandesai96