test suite fails
λ python setup.py test
running test
================================================ test session starts =================================================
platform linux2 -- Python 2.7.12 -- py-1.4.20 -- pytest-2.5.2
collected 13 items
tests/test_lsmtool.py .........FF..
====================================================== FAILURES ======================================================
_____________________________________________________ test_merge _____________________________________________________
def test_merge():
print('Merge patches Patch_0 and Patch_2')
s.merge(['Patch_0', 'Patch_2'], name = 'merged_patch')
> assert len(s.getPatchNames()) == 102
E assert 139 == 102
E + where 139 = len(array(['Patch_1', 'Patch_10', 'Patch_100', 'Patch_101', 'Patch_102',\n 'P... 'Patch_97', 'Patch_98', 'Patch_99', 'merged_patch'], \n dtype='|S50'))
E + where array(['Patch_1', 'Patch_10', 'Patch_100', 'Patch_101', 'Patch_102',\n 'P... 'Patch_97', 'Patch_98', 'Patch_99', 'merged_patch'], \n dtype='|S50') = <bound method SkyModel.getPatchNames of <lsmtool.skymodel.SkyModel object at 0x7fc6c6e03c10>>()
E + where <bound method SkyModel.getPatchNames of <lsmtool.skymodel.SkyModel object at 0x7fc6c6e03c10>> = <lsmtool.skymodel.SkyModel object at 0x7fc6c6e03c10>.getPatchNames
tests/test_lsmtool.py:73: AssertionError
-------------------------------------------------- Captured stdout ---------------------------------------------------
Merge patches Patch_0 and Patch_2
_______________________________________________ test_setPatchPositions _______________________________________________
def test_setPatchPositions():
print('Set patch positions to midpoint of patch')
s.setPatchPositions(method='mid')
> assert round(s.getPatchPositions()['merged_patch'][0].value, 4) == 277.7663
E assert 274.2124 == 277.7663
E + where 274.2124 = round(274.2123791507774, 4)
E + where 274.2123791507774 = <Angle 274.2123791507774 deg>.value
tests/test_lsmtool.py:79: AssertionError
-------------------------------------------------- Captured stdout ---------------------------------------------------
Set patch positions to midpoint of patch
======================================== 2 failed, 11 passed in 33.13 seconds ========================================