Skip to content

Commit

Permalink
Check the truthiness of BackgroundList in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Nov 11, 2024
1 parent 0dd1f48 commit e7d1de7
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 e7d1de7

Please sign in to comment.