Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/test_assemble_cell_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ def checkSortOrder(self, inputs: Iterable[ObservationIdentifiers]) -> None:
"""
visit, detector = -np.inf, -np.inf # Previous visit, detector IDs.
for _, obsId in enumerate(inputs):
with self.subTest(input_number=obsId):
with self.subTest(input_number=repr(obsId)):
self.assertGreaterEqual(obsId.visit, visit)
if visit == obsId.visit:
with self.subTest(detector_number=obsId.detector):
with self.subTest(detector_number=repr(obsId.detector)):
self.assertGreaterEqual(obsId.detector, detector)

visit, detector = obsId.visit, obsId.detector
Expand All @@ -211,13 +211,13 @@ def checkRun(self, assembleTask):
# to the total number of input exposures available.
max_visit_count = len(self.handleList)
for cellId, singleCellCoadd in result.multipleCellCoadd.cells.items():
with self.subTest(x=cellId.x, y=cellId.y):
with self.subTest(x=repr(cellId.x), y=repr(cellId.y)):
self.assertLessEqual(singleCellCoadd.visit_count, max_visit_count)
# Check that the aperture correction maps are not None.
with self.subTest(x=cellId.x, y=cellId.y):
with self.subTest(x=repr(cellId.x), y=repr(cellId.y)):
self.assertTrue(singleCellCoadd.aperture_correction_map is not None)
# Check that the inputs are sorted.
with self.subTest(x=cellId.x, y=cellId.y):
with self.subTest(x=repr(cellId.x), y=repr(cellId.y)):
self.checkSortOrder(singleCellCoadd.inputs)

def test_assemble_basic(self):
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_visit_count(self):
self.runTask()
max_visit_count = len(self.handleList)
for cellId, singleCellCoadd in self.result.multipleCellCoadd.cells.items():
with self.subTest(x=cellId.x, y=cellId.y):
with self.subTest(x=repr(cellId.x), y=repr(cellId.y)):
self.assertLessEqual(singleCellCoadd.visit_count, max_visit_count)

def test_inputs_sorted(self):
Expand Down