syrusakbary / snapshottest

Snapshot Testing utils for Python 📸
MIT License
530 stars 103 forks source link

Add a test and docs for registering custom formatters #104

Closed davidshepherd7 closed 4 years ago

davidshepherd7 commented 4 years ago

After further testing, this doesn't always work and I'm not sure why. I think it might have something to do with Formatter.normalize...

edit: I think it might have been failing in places where I was using an older version of snapshottest.

davidshepherd7 commented 4 years ago

Yeah this isn't as simple as I thought so this PR is incorrect. It seems like snapshot test doesn't render two outputs and then compare them but instead it evals the rendered output and compares the python actual data structures. Presumably this means we get much nicer diffs, but it makes writing a working custom formatter pretty tricky.

Closing.