You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that title sounds a bit silly, but what I meant is that when the "assert_match" method is run, what should be recorded is a copy of the data, not a reference.
It seems that currently what is being recorded is a reference and at the moment of saving the whole snapshot file if the same property is snapshotted twice and it changes in the meantime only the latest value is being saved twice.
The text was updated successfully, but these errors were encountered:
To elaborate on this some more:
When a snapshot is stored (or matched, and none exists, and store is called), a reference is stored. This reference is formatted into a representation during tearDownClass. This means that if things are active during the comparison (like context managers), they may not be active when the snapshot is written. (we use a context manager to normalize Django model reprs so we can ignore things like FK columns).
I think the fix may be to format the data when it's stored, rather than on save.
I know that title sounds a bit silly, but what I meant is that when the "assert_match" method is run, what should be recorded is a copy of the data, not a reference.
It seems that currently what is being recorded is a reference and at the moment of saving the whole snapshot file if the same property is snapshotted twice and it changes in the meantime only the latest value is being saved twice.
The text was updated successfully, but these errors were encountered: