joseph-roitman / pytest-snapshot

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

Snapshot files have a new line at the end of file when running on github CI #61

Closed xuan-zoe closed 1 year ago

xuan-zoe commented 1 year ago

Issue: For some reason there's always a new line \n at the end of each snapshot file when running in CI, but not in local machine. Which is causing failure of tests. Tried to compare only the content, instead of using snapshot.assert_match, but that won't allow me to easily update the snapshot by running pytest --snapshot-update

Any pointers or suggestion would be much appreciated. Thank you! 🙏

xuan-zoe commented 1 year ago

actually it might be due to linting rules. closing issue now. thanks