snaptol.io

snaptol.io#

Functions

json_dump(*args, **kwargs)

Serialises Python objects to a JSON formatted string with indentation.

nodeid_to_key(nodeid)

Get the unique cache key based on the nodeid.

read_snapshot(snapshot_file)

Reads and deserialises a snapshot from a JSON file.

snapshot_directory(test_dir)

Generates the directory where snapshot files will be stored.

snapshot_filename(nodeid, test_dir)

Generates a snapshot filename based on the test nodeid.

write_snapshot(snapshot_file, value)

Writes a snapshot to its file in JSON format.

Classes

SnapshotDiff(snapshot_file, before, after)