Skip to content

Commit

Permalink
Run test_simpleButler w/ NameKeyCollectionmanager
Browse files Browse the repository at this point in the history
Running these tests against both CollectionManager implementations would have caught the bug in the previous commit.
  • Loading branch information
dhirving committed Apr 8, 2024
1 parent e7f4cdb commit 3d98541
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_simpleButler.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,8 @@ class DirectSimpleButlerTestCase(SimpleButlerTests, unittest.TestCase):
"lsst.daf.butler.registry.datasets.byDimensions.ByDimensionsDatasetRecordStorageManagerUUID"
)

collectionsManager = "lsst.daf.butler.registry.collections.synthIntKey.SynthIntKeyCollectionManager"

def setUp(self):
self.root = makeTestTempDir(TESTDIR)

Expand All @@ -777,6 +779,7 @@ def makeButler(self, writeable: bool = False) -> Butler:
tmpdir = tempfile.mkdtemp(dir=self.root)
config["registry", "db"] = f"sqlite:///{tmpdir}/gen3.sqlite3"
config["registry", "managers", "datasets"] = self.datasetsManager
config["registry", "managers", "collections"] = self.collectionsManager
config["root"] = self.root

# have to make a registry first
Expand All @@ -788,6 +791,14 @@ def makeButler(self, writeable: bool = False) -> Butler:
return butler


class NameKeyCollectionManagerDirectSimpleButlerTestCase(DirectSimpleButlerTestCase, unittest.TestCase):
"""Run tests against DirectButler implementation using the
NameKeyCollectionsManager.
"""

collectionsManager = "lsst.daf.butler.registry.collections.nameKey.NameKeyCollectionManager"


@unittest.skipIf(create_test_server is None, "Server dependencies not installed.")
class RemoteSimpleButlerTestCase(SimpleButlerTests, unittest.TestCase):
"""Run tests against Butler client/server."""
Expand Down

0 comments on commit 3d98541

Please sign in to comment.