Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:None
-
Story Points:0.1
-
Team:Architecture
Description
About one time in ten testBox.py fails:
$ python tests/testBox.py
|
.E................
|
======================================================================
|
ERROR: testConstruction (__main__.Box2DTestCase)
|
----------------------------------------------------------------------
|
Traceback (most recent call last):
|
File "tests/testBox.py", line 292, in testConstruction
|
self.assertFloatsAlmostEqual(box.getDimensions(), geom.Extent2D(abs(dim.getX()), abs(dim.getY())))
|
File "/Users/timj/work/lsstsw3/stack/DarwinX86/utils/12.0-10-g3b62a7d+1/python/lsst/utils/tests.py", line 636, in assertFloatsAlmostEqual
|
for a, b, diff, rel in zip(lhs[bad], rhs[bad], absDiff[bad], relTo[bad]):
|
File "/Users/timj/work/lsstsw3/build/afw/python/lsst/afw/geom/geomLib.py", line 2113, in __getitem__
|
if k < 0 or k >= 2: raise IndexError(k)
|
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
|
|
----------------------------------------------------------------------
|
Ran 18 tests in 0.038s
|
|
FAILED (errors=1)
|
Turns out that the random seed setting was moved from module level to class level but only one of the classes was fixed.
Attachments
Issue Links
- is triggered by
-
DM-7207 Modify afw tests to support pytest
- Done
Please take a quick look.