TemporaryButler#

class lsst.images.tests.TemporaryButler(run: str = 'test_run', **kwargs: str)#

Bases: object

Make a temporary butler repository.

Parameters#

run

Name of a RUN collection to register and use as the default run for the returned butler.

**kwargs

A mapping from a dataset type name to its storage class. For each entry, a dataset type will be registered with empty dimensions, and a DatasetRef will be created and added as an attribute of this class.

Raises#

unittest.SkipTest

Raised when the context manager is entered if lsst.daf.butler could not be imported. This is typically handled by using this context manager within a unittest.TestCase.subTest context, which will skip just the butler-required tests in that context while allowing the rest of the test to continue.