snapshottest
snapshottest copied to clipboard
Configure snapshots directory
Right now snapshots are stored in a preconfigured snapshots/
directory — it would be nice if this was customizable, especially if an existing directory with the same name exists.
If this is important to your workflow, I could see adding a global option for this via setup.cfg
. Pull request welcome!
It looks like this change would require that we change "snapshots"
on this line
https://github.com/syrusakbary/snapshottest/blob/fe2fd80bfd2ae36adcae89fd4f57a563ffb68003/snapshottest/module.py#L187
into something configurable. I didn't quite get your reference to setup.cfg
, though, and more generally, I don't really see other patterns for other configurable options for other snapshot test functionality. I might imagine, for example, that when used with Django, this might go into the settings.py
folder, but I"m not sure what the equivalent for other test environments is.
Any opinions on how we set this?
This feature would be very helpful. I would like to change the folder name to __snapshots__
to make it clear that it's not a regular folder.