DatastoreTestHelper

class lsst.daf.butler.tests.DatastoreTestHelper

Bases: object

Helper methods for Datastore tests.

Methods Summary

makeDatastore([sub])

Make a new Datastore instance of the appropriate type.

setUpDatastoreTests(registryClass, configClass)

Shared setUp code for all Datastore tests.

Methods Documentation

makeDatastore(sub: str | None = None) Datastore

Make a new Datastore instance of the appropriate type.

Parameters:
substr, optional

If not None, the returned Datastore will be distinct from any Datastore constructed with a different value of sub. For PosixDatastore, for example, the converse is also true, and sub is used as a subdirectory to form the new root.

Returns:
datastoreDatastore

Datastore constructed by this routine using the supplied optional subdirectory if supported.

setUpDatastoreTests(registryClass: type, configClass: type[Config]) None

Shared setUp code for all Datastore tests.