Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: verify
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Team:SQuaRE
Description
In building verify package on my Mac with numpy 1.14.2 and astropy3 I get the following failure:
============================= test session starts ==============================
|
platform darwin -- Python 3.6.3, pytest-3.2.0, py-1.4.34, pluggy-0.4.0
|
rootdir: /Users/timj/work/lsstsw3/build/verify, inifile: setup.cfg
|
plugins: session2file-0.1.9, forked-0.2, xdist-1.20.1, flake8-0.9.1, remotedata-0.2.1, openfiles-0.3.0, doctestplus-0.1.3, arraydiff-0.2
|
collected 539 items
|
run-last-failure: rerun previous 2 failures
|
|
tests/test_threshold_specification.py FF
|
|
generated xml file: /Users/timj/work/lsstsw3/build/verify/tests/.tests/pytest-verify.xml
|
=================================== FAILURES ===================================
|
___________________ ThresholdSpecificationTestCase.test_spec ___________________
|
|
self = <test_threshold_specification.ThresholdSpecificationTestCase testMethod=test_spec>
|
|
def test_spec(self):
|
"""Test creating and accessing a specification from a quantity."""
|
s = ThresholdSpecification('design', 5 * u.mag, '<')
|
self.assertEqual(s.name, Name(spec='design'))
|
self.assertEqual(s.type, 'threshold')
|
self.assertEqual(s.threshold.value, 5.)
|
self.assertEqual(s.threshold.unit, u.mag)
|
self.assertEqual(s.operator_str, '<')
|
self.assertEqual(
|
repr(s),
|
> "ThresholdSpecification("
|
"Name(spec='design'), <Quantity 5.0 mag>, '<')")
|
E AssertionError: "ThresholdSpecification(Name(spec='design'), <Quantity 5. mag>, '<')" != "ThresholdSpecification(Name(spec='design'), <Quantity 5.0 mag>, '<')"
|
E - ThresholdSpecification(Name(spec='design'), <Quantity 5. mag>, '<')
|
E + ThresholdSpecification(Name(spec='design'), <Quantity 5.0 mag>, '<')
|
E ? +
|
|
tests/test_threshold_specification.py:118: AssertionError
|
___________________ ThresholdSpecificationTestCase.test_spec ___________________
|
|
self = <test_threshold_specification.ThresholdSpecificationTestCase testMethod=test_spec>
|
|
def test_spec(self):
|
"""Test creating and accessing a specification from a quantity."""
|
s = ThresholdSpecification('design', 5 * u.mag, '<')
|
self.assertEqual(s.name, Name(spec='design'))
|
self.assertEqual(s.type, 'threshold')
|
self.assertEqual(s.threshold.value, 5.)
|
self.assertEqual(s.threshold.unit, u.mag)
|
self.assertEqual(s.operator_str, '<')
|
self.assertEqual(
|
repr(s),
|
> "ThresholdSpecification("
|
"Name(spec='design'), <Quantity 5.0 mag>, '<')")
|
E AssertionError: "ThresholdSpecification(Name(spec='design'), <Quantity 5. mag>, '<')" != "ThresholdSpecification(Name(spec='design'), <Quantity 5.0 mag>, '<')"
|
E - ThresholdSpecification(Name(spec='design'), <Quantity 5. mag>, '<')
|
E + ThresholdSpecification(Name(spec='design'), <Quantity 5.0 mag>, '<')
|
E ? +
|
|
tests/test_threshold_specification.py:118: AssertionError
|
============================= 537 tests deselected =============================
|
=================== 2 failed, 537 deselected in 3.40 seconds ===================
|
Global pytest run: failed
|
scons: Nothing to be done for `examples'.
|
scons: Nothing to be done for `doc'.
|
Failed test output:
|
Global pytest output is in /Users/timj/work/lsstsw3/build/verify/tests/.tests/pytest-verify.xml.failed
|
The following tests failed:
|
/Users/timj/work/lsstsw3/build/verify/tests/.tests/pytest-verify.xml.failed
|
1 tests failed
|
scons: *** [checkTestStatus] Error 1
|
scons: building terminated because of errors.
|
The repr for a Quantity must have changed.
The code is https://github.com/lsst/verify/blob/master/python/lsst/verify/spec/threshold.py#L105
Likely the best solution is just updating the test.