to_snapshot

forge.testingfunctionSince Forge API 1
Signaturepython
forge.testing.to_snapshot(value: TestRun | RunResult | Mapping[str, Any]) -> dict[str, Any]

A run, or a mapping of numbers, text, lists and mappings, as the plain structure a snapshot stores.

Parameters

NameType
valueTestRun | RunResult | Mapping[str, Any]

Trades are sorted by entry time, symbol and side, and refusals by name. A mapping keeps its keys sorted. Numbers are kept exactly, NaN is written as the text "NaN", and infinity as "Infinity" and "-Infinity".