feat(numbers): added InEpsilonSymmetric by fredbi · Pull Request #109 · go-openapi/testify (original) (raw)

This variant of InEpsilon (also available as a generic assertion), uses a modified relative error, so that both operands play a symmetric role.

This is useful when the "expected" value doesn't play a particular role when asserting that 2 numbers are close. Mirrors python's math.isclose.

Refers to: stretchr#1839

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist