MCPcopy Create free account
hub / github.com/pytest-dev/pytest / ApproxDecimal

Class ApproxDecimal

src/_pytest/python_api.py:511–515  ·  view source on GitHub ↗

Perform approximate comparisons where the expected value is a Decimal.

Source from the content-addressed store, hash-verified

509
510
511class ApproxDecimal(ApproxScalar):
512 """Perform approximate comparisons where the expected value is a Decimal."""
513
514 DEFAULT_ABSOLUTE_TOLERANCE = Decimal("1e-12")
515 DEFAULT_RELATIVE_TOLERANCE = Decimal("1e-6")
516
517
518def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase:

Callers 1

_approx_scalarMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected