Serializer should fail on max depth exceeded to break cycles #72
Labels
bug
Something isn't working
feature request
New feature or request
serializer
Syrupy serializer question
Milestone
Describe the bug
If you serialize an object containing a cycle, it will recurse until call stack overflows / python can no longer handle it, rather than a graceful application error.
To Reproduce
Expected behaviour
Error should be thrown if a cycle is detected.
Additional context
We already track "indent". We could add some logic to throw an error if indent exceeds some level as it's essentially equivalent to depth.
The text was updated successfully, but these errors were encountered: