Skip to content

Commit

Permalink
Add a unit test covering visit_count
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Mar 29, 2024
1 parent 4f8a23a commit c1f3b87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_assemble_cell_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def checkRun(self, assembleTask):

# Check that we produced an exposure.
self.assertTrue(result.multipleCellCoadd is not None)
# Check that the visit_count method returns a number less than or equal
# to the total number of input exposures available.
max_visit_count = len(self.dataRefList)
for cellId, singleCellCoadd in result.multipleCellCoadd.cells.items():
with self.subTest(x=cellId.x, y=cellId.y):
self.assertLessEqual(singleCellCoadd.visit_count, max_visit_count)

def testAssembleBasic(self):
"""Test that AssembleCellCoaddTask runs successfully without errors.
Expand Down

0 comments on commit c1f3b87

Please sign in to comment.