8000 How to implement assertions with a tolerance · Issue #565 · syrupy-project/syrupy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
How to implement assertions with a tolerance #565
Closed as not planned
Closed as not planned
@noahnu

Description

@noahnu

Discussed in #537

Originally posted by rassie August 4, 2021
I would like to implement this assertion to check that count is within 10% of the expected value:

assert count <= snapshot * 1.1 and count >= snapshot * 0.9

Is there a good way to do that with syrupy?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0