-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This looks like a really nice project! I was looking for a snapshot testing library to automate tests that compare some JSON responses. One feature I would really like is to store the snapshots in code. For example, something like this:
def test_foo():
expected_value = snapshot(
{...} # some large dict
)
actual_value = foo()
assert expected_value == actual_valueThe reason for this is to keep the expected/snapshotted value close to where it is being used, which makes it a lot easier to inspect the expected value, e.g. in code review.
Although I've never used it, it seems that insta (Rust version) supports this, albeit only for strings. I think native Python objects would be ideal, but storing inline as JSON might be easier.
Metadata
Metadata
Assignees
Labels
No labels