8000 snapshot testing · Issue #74 · assertpy/assertpy · GitHub
[go: up one dir, main page]

Skip to content

snapshot testing #74

@saturnboy

Description

@saturnboy

Create a snapshot testing system to mirror the super useful snapshot testing capabilities found in Jest (a Javascript testing framework).

  1. Something like assert_that(some_obj).snapshot():
    • if no snapshot found, take snapshot and pass test
    • if snapshot exists, take new snapshot and compare with existing, pass only if they are equal
  2. Should work for objects, dicts, or any python value (within reason).
  3. Need some kind of deep object verification (see deep dict compare #75)
  4. Snaps should be pickled (or configurable to be json with known loss of fidelity)
  5. Able to ignore a property or branch, maybe ignore=foo.bar.baz
  6. Need unique identifier for every snapshot, maybe filename + line no?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0