Skip to content

Commit

Permalink
Merge pull request #752 from lsst/tickets/DM-46697
Browse files Browse the repository at this point in the history
Set the truthiness value of BackgroundList
  • Loading branch information
arunkannawadi authored Nov 12, 2024
2 parents 0dd1f48 + e7d1de7 commit 1498420
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_background.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,8 @@ def testBackgroundList(self):
approxWeighting = False

backgroundList = afwMath.BackgroundList()
# An empty BackgroundList should eval to False, like an empty list.
self.assertFalse(backgroundList)

for i in range(2):
bkgd = afwMath.makeBackground(self.image, bgCtrl)
Expand All @@ -684,6 +686,7 @@ def testBackgroundList(self):
backgroundList.append(bkgd)

def assertBackgroundList(bgl):
self.assertTrue(bgl)
self.assertEqual(len(bgl), 2) # check that len() works
for a in bgl: # check that we can iterate
pass
Expand Down

0 comments on commit 1498420

Please sign in to comment.