diff --git a/tests/test_psfCandidate.py b/tests/test_psfCandidate.py index 57941f0cb..ce8a0d5dd 100755 --- a/tests/test_psfCandidate.py +++ b/tests/test_psfCandidate.py @@ -202,8 +202,14 @@ def testFaintNeighborMasking(self): def testStr(self): candidate = self.createCandidate() + + # The setX methods are class globals and could contain values set + # by other code. Force the values here to ensure test consistency. candidate.setChi2(2.0) - expect = "center=(123.0,45.0), status=UNKNOWN, rating=1.0, size=(0, 0), chi2=2.0, amplitude=0.0" + candidate.setWidth(5460) + candidate.setHeight(9584) + + expect = "center=(123.0,45.0), status=UNKNOWN, rating=1.0, size=(5460, 9584), chi2=2.0, amplitude=0.0" self.assertEqual(str(candidate), expect)