BadNoWriteFormatter

class lsst.daf.butler.tests.BadNoWriteFormatter(file_descriptor: FileDescriptor, *, ref: DatasetRef, write_parameters: Mapping[str, Any] | None = None, write_recipes: Mapping[str, Any] | None = None, **kwargs: Any)

Bases: BadWriteFormatter

A formatter that always fails without writing anything.

Methods Summary

write_direct(in_memory_dataset, uri[, ...])

Write empty file and immediately fail.

Methods Documentation

write_direct(in_memory_dataset: Any, uri: ResourcePath, cache_manager: AbstractDatastoreCacheManager | None = None) bool

Write empty file and immediately fail.

Parameters:
in_memory_datasettyping.Any

The Python object to serialize.

urilsst.resources.ResourcePath

The location to write the content.

cache_managerAbstractDatastoreCacheManager

Cache manager. Unused.

Raises:
RuntimeError

Raised every time specifically for testing this scenario.