test
- snapshot_compatible(obj, float_decimals=6, significant_digits=12)[source]
Renders an object snapshot-compatible by appropriately converting nested types and reducing float precision to a level that is likely to not cause problems when testing snapshots for equivalence on different platforms
- Parameters
obj – the object to convert
float_decimals – the number of float decimal places to consider
significant_digits – the (maximum) number of significant digits to consider
- Returns
the converted object