massdash.testing.NumpySnapshotExtension
- class massdash.testing.NumpySnapshotExtension
Bases:
SingleFileSnapshotExtensionHandles Numpy Snapshots. Snapshots are stored as dat files and the numpy arrays are compared using numpy testing methods.
- matches(*, serialized_data, snapshot_data)
Compares serialized data and snapshot data and returns whether they match.
- read_snapshot_data_from_location(*, snapshot_location: str, snapshot_name: str, session_id: str)
Get only the snapshot data from location for assertion
- serialize(data: Any, **kwargs: Any) str
Serializes a python object / data structure into a string to be used for comparison with snapshot data from disk.
- classmethod write_snapshot_collection(*, snapshot_collection: SnapshotCollection) None
Adds the snapshot data to the snapshots in collection location