RoundtripJson#

class lsst.images.tests.RoundtripJson(original, storage_class=None, recipe=None, **kwargs)#

Bases: RoundtripBase, Generic

Parameters:

Attributes Summary

filename

The name of the file the object was written to.

serialized

The serialization model for this object (serialization.ArchiveTree).

Methods Summary

get([component, storageClass])

Perform a partial read.

inspect()

Read the JSON file as a dictionary.

Attributes Documentation

filename#

The name of the file the object was written to.

serialized#

The serialization model for this object (serialization.ArchiveTree).

Methods Documentation

get(component=None, storageClass=None, **kwargs)#

Perform a partial read.

Parameters:
  • component (str | None, default: None) – Component to read instead of the main object. This requires the roundtrip to use a butler; pytest.skip is called otherwise. Place calls to this method in a dedicated test function that contains only component-read assertions, so the skip does not suppress unrelated always-run assertions in other test functions.

  • storageClass (str | None, default: None) – Override storage class name to affect the type returned by the get. Only used if a butler is active.

  • **kwargs (Any) – Keyword arguments either passed directly to read_archive or used as parameters for a get.

Returns:

Result of the partial read.

Return type:

object

inspect()#

Read the JSON file as a dictionary.

Return type:

dict[str, Any]

This page was last modified on .