boost-histogram icon indicating copy to clipboard operation
boost-histogram copied to clipboard

Added comparison function as histogram operation (with colorized + info based string return)

Open gohil-jay opened this issue 3 years ago • 5 comments
trafficstars

image

gohil-jay avatar Jul 01 '22 03:07 gohil-jay

@henryiii, pre-commit throws few errors... Any feedback/suggestion?

gohil-jay avatar Jul 01 '22 19:07 gohil-jay

It's complaining because you are using the result of re.search without checking to see if it has a result first. I think the best fix, though, is to use ._storage_type, which contains the storage type of the histogram, rather than trying to parse it out of the repr.

henryiii avatar Jul 03 '22 18:07 henryiii

I've been looking for something like _storage_type since the beginning (couldn't find it on docs or book here)! But alright now it should work :)

gohil-jay avatar Jul 03 '22 20:07 gohil-jay

Seems alright now (?)

gohil-jay avatar Jul 03 '22 21:07 gohil-jay

Note: the goal is to support pytest_assertrepr_compare https://docs.pytest.org/en/latest/how-to/assert.html#defining-your-own-explanation-for-failed-assertions

henryiii avatar Aug 16 '22 16:08 henryiii