Skip to content

Commit 423db09

Browse files
committed
Enable prep_butler unit tests again
Some unit tests were temporarily marked expectedFailure in 674a4b1. Now that we switch to the new query system, make them work again. The test repo was put together using middleware tools, which intrinsically uses butler repo's visit-detector regions with its padding from defineVisits config. That padding config is not the same as the preload region padding in prompt processing. This explains the patch differences in template selection.
1 parent 3200f0a commit 423db09

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/test_middleware_interface.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ def _check_imports(self, butler, group, detector, expected_shards):
275275
# Check that the right templates are in the chained output collection.
276276
# Need to refresh the butler to get all the dimensions/collections.
277277
butler.registry.refresh()
278-
for patch in (142, 143, 144, 158, 159, 160, 161, 175, 176, 177, 178,
279-
# TODO DM-43712: doesn't load 179 or 196
280-
179, 192, 193, 194, 195, 196, 210, 211,):
278+
for patch in (142, 143, 158, 159, 160, 161, 175, 176, 177, 178,
279+
192, 193, 194, 195, 210, 211,):
281280
with self.subTest(tract=7445, patch=patch):
282281
self.assertTrue(
283282
butler.exists('goodSeeingCoadd', tract=7445, patch=patch, band="g",
@@ -308,8 +307,6 @@ def _check_imports(self, butler, group, detector, expected_shards):
308307
collections=preload_collection)
309308
)
310309

311-
# TODO: prep_butler doesn't grab all the refcats. Should be fixable on DM-43712
312-
@unittest.expectedFailure
313310
def test_prep_butler(self):
314311
"""Test that the butler has all necessary data for the next visit.
315312
"""
@@ -366,8 +363,6 @@ def test_prep_butler_novalid(self):
366363

367364
mock_pre.assert_not_called()
368365

369-
# TODO: prep_butler doesn't grab all the refcats. Should be fixable on DM-43712
370-
@unittest.expectedFailure
371366
def test_prep_butler_twice(self):
372367
"""prep_butler should have the correct calibs (and not raise an
373368
exception!) on a second run with the same, or a different detector.

0 commit comments

Comments
 (0)