Skip to content

Commit 118c952

Browse files
committed
Add a unit test for subset_containing_ccds
1 parent 02886f5 commit 118c952

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_coadds.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,16 @@ def test_inputs(self):
610610
)
611611
self.assertEqual(len(self.stitched_coadd.visits), 1)
612612

613+
def test_coaddInputs(self):
614+
"""Test that the inputs are populated when converted to Exposure."""
615+
inputs = self.stitched_coadd.asExposure().getInfo().getCoaddInputs()
616+
for position, _ in self.test_positions:
617+
ccds = inputs.subset_containing_ccds(position, None)
618+
visits = inputs.subset_containing_visits(position, None)
619+
with self.subTest(x=position.x, y=position.y):
620+
self.assertEqual(len(ccds), 1)
621+
self.assertEqual(len(visits), 1)
622+
613623
def test_borders(self):
614624
"""Test that the borders are populated correctly on stitching."""
615625
mi = self.stitched_coadd.asMaskedImage()

0 commit comments

Comments
 (0)