Skip to content

Commit

Permalink
fixup! Factor out the region computation
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfang committed Nov 7, 2024
1 parent 9c0fb9a commit 2fb0771
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_middleware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@ def test_init(self):
self.assertEqual(self.interface.rawIngestTask.config.failFast, True)
self.assertEqual(self.interface.rawIngestTask.config.transfer, "copy")

def test_compute_region(self):
"""Test preload region computation."""
region = self.interface._compute_region()
self.assertTrue(isinstance(region, lsst.sphgeom.Region))

def _check_imports(self, butler, group, detector, expected_shards):
"""Test that the butler has the expected supporting data.
"""
Expand Down Expand Up @@ -1333,3 +1328,12 @@ def test_export_outputs(self):
self.assertEqual(
self._count_datasets(central_butler, ["raw", "calexp"], f"{instname}/defaults"),
0)

def test_compute_region(self):
"""Test preload region computation."""
region = self.interface._compute_region()
self.assertTrue(isinstance(region, lsst.sphgeom.Region))
results = self.interface.butler.query_dimension_records("visit_detector_region", instrument=instname, group="1")

Check failure on line 1336 in tests/test_middleware_interface.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E501

line too long (120 > 110 characters)
visit_detector_region = list(results)[0].region
# TODO: DM-47460 for a better test.
self.assertTrue(visit_detector_region.intersects(region))

0 comments on commit 2fb0771

Please sign in to comment.