skip to content
Integration Tests Report
User Tools
Register
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
Register
>
Recent Changes
Media Manager
Sitemap
Trace:
reports:74fa0e8
Media Files
Test executed on commit [[https://www.github.com/tardis-sn/tardis/commit/74fa0e8520a032eb6e3fbc4391f6d5372c4a861b|74fa0e8520a032eb6e3fbc4391f6d5372c4a861b]] <html> <head> <meta charset="utf-8"/> <title>Test Report</title> <style>body { font-family: Helvetica, Arial, sans-serif; font-size: 12px; min-width: 1200px; color: #999; } h2 { font-size: 16px; color: black; } p { color: black; } a { color: #999; } table { border-collapse: collapse; } /****************************** * SUMMARY INFORMATION ******************************/ #environment td { padding: 5px; border: 1px solid #E6E6E6; } #environment tr:nth-child(odd) { background-color: #f6f6f6; } /****************************** * TEST RESULT COLORS ******************************/ span.passed, .passed .col-result { color: green; } span.skipped, span.xfailed, .skipped .col-result, .xfailed .col-result { color: orange; } span.error, span.failed, span.xpassed, .error .col-result, .failed .col-result, .xpassed .col-result { color: red; } /****************************** * RESULTS TABLE * * 1. Table Layout * 2. Extra * 3. Sorting items * ******************************/ /*------------------ * 1. Table Layout *------------------*/ #results-table { border: 1px solid #e6e6e6; color: #999; font-size: 12px; width: 100% } #results-table th, #results-table td { padding: 5px; border: 1px solid #E6E6E6; text-align: left } #results-table th { font-weight: bold } /*------------------ * 2. Extra *------------------*/ .log:only-child { height: inherit } .log { background-color: #e6e6e6; border: 1px solid #e6e6e6; color: black; display: block; font-family: "Courier New", Courier, monospace; height: 230px; overflow-y: scroll; padding: 5px; white-space: pre-wrap } div.image { border: 1px solid #e6e6e6; float: right; height: 240px; margin-left: 5px; overflow: hidden; width: 320px } div.image img { width: 320px } /*------------------ * 3. Sorting items *------------------*/ .sortable { cursor: pointer; } .sort-icon { font-size: 0px; float: left; margin-right: 5px; margin-top: 5px; /*triangle*/ width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; } .inactive .sort-icon { /*finish triangle*/ border-top: 8px solid #E6E6E6; } .asc.active .sort-icon { /*finish triangle*/ border-bottom: 8px solid #999; } .desc.active .sort-icon { /*finish triangle*/ border-top: 8px solid #999; } </style></head> <body> <script>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ function toArray(iter) { if (iter === null) { return null; } return Array.prototype.slice.call(iter); } function find(selector, elem) { if (!elem) { elem = document; } return elem.querySelector(selector); } function find_all(selector, elem) { if (!elem) { elem = document; } return toArray(elem.querySelectorAll(selector)); } function sort_column(elem) { toggle_sort_states(elem); var colIndex = toArray(elem.parentNode.childNodes).indexOf(elem); var key; if (elem.classList.contains('numeric')) { key = key_num; } else if (elem.classList.contains('result')) { key = key_result; } else { key = key_alpha; } sort_table(elem, key(colIndex)); } addEventListener("DOMContentLoaded", function() { reset_sort_headers(); split_extra_onto_two_rows(); sort_column(find('.initial-sort')); find_all('.col-links a.image').forEach(function(elem) { elem.addEventListener("click", function(event) { var node = elem; while (node && !node.classList.contains('results-table-row')) { node = node.parentNode; } if (node != null) { if (node.nextSibling && node.nextSibling.classList.contains("extra")) { var href = find('.image img', node.nextSibling).src; window.open(href); } } event.preventDefault(); }, false) }); find_all('.image a').forEach(function(elem) { elem.addEventListener("click", function(event) { window.open(find('img', elem).getAttribute('src')); event.preventDefault(); }, false) }); find_all('.sortable').forEach(function(elem) { elem.addEventListener("click", function(event) { sort_column(elem); }, false) }); }); function sort_table(clicked, key_func) { one_row_for_data(); var rows = find_all('.results-table-row'); var reversed = !clicked.classList.contains('asc'); var sorted_rows = sort(rows, key_func, reversed); var parent = document.getElementById('results-table-body'); sorted_rows.forEach(function(elem) { parent.appendChild(elem); }); split_extra_onto_two_rows(); } function sort(items, key_func, reversed) { var sort_array = items.map(function(item, i) { return [key_func(item), i]; }); var multiplier = reversed ? -1 : 1; sort_array.sort(function(a, b) { var key_a = a[0]; var key_b = b[0]; return multiplier * (key_a >= key_b ? 1 : -1); }); return sort_array.map(function(item) { var index = item[1]; return items[index]; }); } function key_alpha(col_index) { return function(elem) { return elem.childNodes[col_index].firstChild.data.toLowerCase(); }; } function key_num(col_index) { return function(elem) { return parseFloat(elem.childNodes[col_index].firstChild.data); }; } function key_result(col_index) { return function(elem) { var strings = ['Error', 'Failed', 'XFailed', 'XPassed', 'Skipped', 'Passed']; return strings.indexOf(elem.childNodes[col_index].firstChild.data); }; } function reset_sort_headers() { find_all('.sort-icon').forEach(function(elem) { elem.parentNode.removeChild(elem); }); find_all('.sortable').forEach(function(elem) { var icon = document.createElement("div"); icon.className = "sort-icon"; icon.textContent = "vvv"; elem.insertBefore(icon, elem.firstChild); elem.classList.remove("desc", "active"); elem.classList.add("asc", "inactive"); }); } function toggle_sort_states(elem) { //if active, toggle between asc and desc if (elem.classList.contains('active')) { elem.classList.toggle('asc'); elem.classList.toggle('desc'); } //if inactive, reset all other functions and add ascending active if (elem.classList.contains('inactive')) { reset_sort_headers(); elem.classList.remove('inactive'); elem.classList.add('active'); } } function split_extra_onto_two_rows() { find_all('tr.results-table-row').forEach(function(elem) { var new_row = document.createElement("tr") new_row.className = "extra"; elem.parentNode.insertBefore(new_row, elem.nextSibling); find_all(".extra", elem).forEach(function (td_elem) { if (find("*:not(.empty)", td_elem)) { new_row.appendChild(td_elem); td_elem.colSpan=5; } else { td_elem.parentNode.removeChild(td_elem); } }); }); } function one_row_for_data() { find_all('tr.results-table-row').forEach(function(elem) { if (elem.nextSibling.classList.contains('extra')) { toArray(elem.nextSibling.childNodes).forEach( function (td_elem) { elem.appendChild(td_elem); }) } else { var new_td = document.createElement("td"); new_td.className = "extra"; elem.appendChild(new_td); } }); } </script> <p>Report generated on 17-Jun-2016 at 14:41:19</p> <h2>Environment</h2> <table id="environment"> <tr> <td>Platform</td> <td>Linux-3.16.0-70-generic-x86_64-with-debian-jessie-sid</td></tr> <tr> <td>Python</td> <td>2.7.11</td></tr></table> <h2>Summary</h2> <p>9 tests ran in 104.27 seconds.<br/><span class="passed">6 passed</span>, <span class="skipped">0 skipped</span>, <span class="failed">3 failed</span>, <span class="error">0 errors</span>.<br/><span class="skipped">0 expected failures</span>, <span class="failed">0 unexpected passes</span>.</p> <h2>Results</h2> <table id="results-table"> <thead id="results-table-head"> <tr> <th class="sortable initial-sort result" col="result">Result</th> <th class="sortable" col="name">Test</th> <th class="sortable numeric" col="duration">Duration</th> <th>Links</th></tr></thead> <tbody id="results-table-body"> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_j_estimators</td> <td class="col-duration">0.02</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_j_blue_estimators</td> <td class="col-duration">1.06</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_last_line_interactions</td> <td class="col-duration">0.00</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_nubar_estimators</td> <td class="col-duration">0.00</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_ws</td> <td class="col-duration">0.00</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="passed results-table-row"> <td class="col-result">Passed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_luminosity_inner</td> <td class="col-duration">0.00</td> <td class="col-links"></td> <td class="extra"> <div class="empty log">No log output captured.</div></td></tr> <tr class="failed results-table-row"> <td class="col-result">Failed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_spectrum</td> <td class="col-duration">0.01</td> <td class="col-links"></td> <td class="extra"> <div class="log">self = <tardis.tests.tests_slow.test_w7.TestW7 object at 0x7f18ce1247d0><br/>plot_object = <tardis.tests.tests_slow.plot_helpers.PlotUploader object at 0x7f18ce124110><br/><br/> def test_spectrum(self, plot_object):<br/> assert_quantity_allclose(<br/> self.reference['luminosity_density_nu'],<br/>> self.result.runner.spectrum.luminosity_density_nu)<br/><br/>tardis/tests/tests_slow/test_w7.py:117: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/astropy/tests/helper.py:632: in assert_quantity_allclose<br/> **kwargs)<br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f18ce176ed8><br/>x = array([ 0.00000000e+00, 0.00000000e+00, 1.49367226e+28, ...,<br/> 0.00000000e+00, 0.00000000e+00, 0.00000000e+00])<br/>y = array([ 0.00000000e+00, 0.00000000e+00, 1.49367256e+28, ...,<br/> 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]), err_msg = ''<br/>verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 8.79%)</span><br/><span class="error">E x: array([ 0.000000e+00, 0.000000e+00, 1.493672e+28, ..., 0.000000e+00,</span><br/><span class="error">E 0.000000e+00, 0.000000e+00])</span><br/><span class="error">E y: array([ 0.000000e+00, 0.000000e+00, 1.493673e+28, ..., 0.000000e+00,</span><br/><span class="error">E 0.000000e+00, 0.000000e+00])</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr> <tr class="failed results-table-row"> <td class="col-result">Failed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_montecarlo_properties</td> <td class="col-duration">0.01</td> <td class="col-links"></td> <td class="extra"> <div class="log">self = <tardis.tests.tests_slow.test_w7.TestW7 object at 0x7f18c994ab50><br/><br/> def test_montecarlo_properties(self):<br/> assert_quantity_allclose(<br/> self.reference['montecarlo_luminosity'],<br/> self.result.montecarlo_luminosity)<br/> <br/> assert_quantity_allclose(<br/> self.reference['montecarlo_virtual_luminosity'],<br/>> self.result.runner.montecarlo_virtual_luminosity)<br/><br/>tardis/tests/tests_slow/test_w7.py:160: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/astropy/tests/helper.py:632: in assert_quantity_allclose<br/> **kwargs)<br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f18c995b848><br/>x = array([ 6.80363695e+38, 1.49379930e+39, 8.43637402e+38, ...,<br/> 0.00000000e+00, 0.00000000e+00, 0.00000000e+00])<br/>y = array([ 6.80363695e+38, 1.49379930e+39, 8.43637402e+38, ...,<br/> 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]), err_msg = ''<br/>verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 0.28%)</span><br/><span class="error">E x: array([ 6.803637e+38, 1.493799e+39, 8.436374e+38, ..., 0.000000e+00,</span><br/><span class="error">E 0.000000e+00, 0.000000e+00])</span><br/><span class="error">E y: array([ 6.803637e+38, 1.493799e+39, 8.436374e+38, ..., 0.000000e+00,</span><br/><span class="error">E 0.000000e+00, 0.000000e+00])</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr> <tr class="failed results-table-row"> <td class="col-result">Failed</td> <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/tests_slow/test_w7.py::TestW7::()::test_shell_temperature</td> <td class="col-duration">0.01</td> <td class="col-links"></td> <td class="extra"> <div class="log">self = <tardis.tests.tests_slow.test_w7.TestW7 object at 0x7f18c99d4990><br/>plot_object = <tardis.tests.tests_slow.plot_helpers.PlotUploader object at 0x7f18c99d4a10><br/><br/> def test_shell_temperature(self, plot_object):<br/> assert_quantity_allclose(<br/> self.reference['t_rads'],<br/>> self.result.t_rads)<br/><br/>tardis/tests/tests_slow/test_w7.py:169: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/astropy/tests/helper.py:632: in assert_quantity_allclose<br/> **kwargs)<br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f18c93c6b18><br/>x = array([ 10936.03215232, 9888.11770588, 9146.48415051, 9125.42125351,<br/> ...11, 8719.6473306 ,<br/> 8643.73184199, 8675.04411592, 8730.64885705])<br/>y = array([ 10936.03215232, 9883.11770588, 9136.48415051, 9110.42125351,<br/> ...11, 8604.6473306 ,<br/> 8523.73184199, 8550.04411592, 8600.64885705])<br/>err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 96.2962962963%)</span><br/><span class="error">E x: array([ 10936.032152, 9888.117706, 9146.484151, 9125.421254,</span><br/><span class="error">E 8894.998072, 8897.837712, 8803.655887, 9047.992354,</span><br/><span class="error">E 8941.21192 , 8853.031243, 8707.324676, 8734.898159,...</span><br/><span class="error">E y: array([ 10936.032152, 9883.117706, 9136.484151, 9110.421254,</span><br/><span class="error">E 8874.998072, 8872.837712, 8773.655887, 9012.992354,</span><br/><span class="error">E 8901.21192 , 8808.031243, 8657.324676, 8679.898159,...</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr></tbody></table></body></html>
Save
Preview
Cancel
Edit summary
Note: By editing this page you agree to license your content under the following license:
CC Attribution-Share Alike 3.0 Unported
reports/74fa0e8.1466154681.txt.gz
· Last modified: 2016/06/17 11:11 by
karandesai96
Page Tools
Show page
Old revisions
Backlinks
Back to top