joseph-roitman / pytest-snapshot

A plugin for snapshot testing with pytest.
MIT License
117 stars 12 forks source link

Request for pretty/formatted snapshots #17

Closed vedavidhbudimuri closed 4 years ago

vedavidhbudimuri commented 4 years ago

It would be great if we can have our snapshots properly formatted so that it would be easy for developers to read.

joseph-roitman commented 4 years ago

What do you mean by properly formatted? Snapshots are strings, so you should do the formatting yourself when converting your object into a string. For example, if snapshot testing JSON, use the indent=4 option.