assert: Add new assertion InEpsilonMapValues
Summary
Add new assertion InEpsilonMapValues which is the same as InEpsilon, but it compares all values between two maps.
Changes
- Add new assertion
InEpsilonMapValues
Motivation
Quoting https://github.com/stretchr/testify/issues/1497
To be consistent with InDeltaMapValues package could provide InEpsilonMapValues
Example
expected := map[string]float64{
"foo": 2.2,
"baz": 2.0,
}
actual := map[string]float64{
"foo": 2.1,
"baz": 2.1,
}
InEpsilonMapValues(mockT, expected, actual, 0.06, "InEpsilonMapValues example")
Related issues
Closes https://github.com/stretchr/testify/issues/1497
@hendrywiranto, hi!
I am not maintainer of testify and cannot approve or decline your MR.
But LGTM.
(cc) @dolmen
@hendrywiranto, hi!
I am not maintainer of
testifyand cannot approve or decline your MR. But LGTM.(cc) @dolmen
Yep I know, thanks for replying tho Looks like the checks failure is a widespread issue and being handled here https://github.com/stretchr/testify/pull/1504
FYI, my focus is on fixing bugs, not on extending the API to have even more code to maintain.