Skip to content

Commit

Permalink
Enable prep_butler unit tests again
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hsinfang committed Oct 3, 2024
1 parent 75c52df commit 6839a4b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/test_middleware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,8 @@ def _check_imports(self, butler, group, detector, expected_shards):
# Check that the right templates are in the chained output collection.
# Need to refresh the butler to get all the dimensions/collections.
butler.registry.refresh()
for patch in (142, 143, 144, 158, 159, 160, 161, 175, 176, 177, 178,
# TODO DM-43712: doesn't load 179 or 196
179, 192, 193, 194, 195, 196, 210, 211,):
for patch in (142, 143, 158, 159, 160, 161, 175, 176, 177, 178,
192, 193, 194, 195, 210, 211,):
with self.subTest(tract=7445, patch=patch):
self.assertTrue(
butler.exists('goodSeeingCoadd', tract=7445, patch=patch, band="g",
Expand Down Expand Up @@ -308,8 +307,6 @@ def _check_imports(self, butler, group, detector, expected_shards):
collections=preload_collection)
)

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

mock_pre.assert_not_called()

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

0 comments on commit 6839a4b

Please sign in to comment.