pytest-icdiff icon indicating copy to clipboard operation
pytest-icdiff copied to clipboard

Can we use Beeprint for objects?

Open rodfersou opened this issue 3 years ago • 7 comments

https://github.com/panyanyany/beeprint

rodfersou avatar Mar 15 '22 10:03 rodfersou

@jedie any reason for the thumbs down?

rodfersou avatar Apr 03 '22 03:04 rodfersou

I'm creating a fork after wait more than 1 year for a feedback

thanks again 🙏

rodfersou avatar Jun 07 '23 04:06 rodfersou

haha sorry i'm not a very good maintainer.

would love to see some side-by-side comparisons of beeprint vs icdiff, if you get it all up and running?

hjwp avatar Jun 07 '23 10:06 hjwp

@hjwp be my guest https://github.com/rodfersou/pytest-beeprint

it play nice with pydantic models after few tweaks in repr

rodfersou avatar Jul 05 '23 08:07 rodfersou

@hjwp image

rodfersou avatar Jul 06 '23 09:07 rodfersou

looks good! is it ok if i merge in your fork? i'll credit you in the readme...

hjwp avatar Nov 08 '23 23:11 hjwp

ok so the problem i ran into is that beeprint seems to ignore the width= argument, so it doesn't handle some long input types well. eg:

>>> beeprint.pp(list(range(50)), width=20)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
>>> beeprint.pp("hello " * 50, width=20)
'hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello
 hello hello hello hello hello hello '

I'd expect the two examples above to be breaking into multiple lines as soon as the width hits 20.

hjwp avatar Nov 08 '23 23:11 hjwp