💭 inline-snapshot ================= !https://15r10nk.github.io/inline-snapshot/ Date: April 17, 2024 Redirecting 15r10nk.github.io [1] This is a cool snapshot testing tool that automatically creates, and updates test values for you. Starting with some test code. ``` python from inline_snapshot import snapshot def something(): return 1548 * 18489 def test_something(): assert something() == snapshot() ``` now if I run `pytest` my tests will fail because my assert will fail, but if I run `pytest --inline-snapshot=create` it will fill out my snapshot values and the file will then look like this. ``` python from inline_snapshot import snapshot def something(): return 1548 * 18489 def test_something(): assert something() == snapshot(28620972) ``` !!! note This post is a thought [2]. It's a short note that I make about someone else's content online #thoughts [3] References: [1]: https://15r10nk.github.io/inline-snapshot/ [2]: /thoughts/ [3]: /tags/thoughts/