zaufi / pytest-matcher

A pytest plugin to match test output against patterns stored in files
https://pytest-matcher.readthedocs.io
2 stars 1 forks source link

Hex dump of actual/expect #18

Open zaufi opened 8 months ago

zaufi commented 8 months ago

It'll be nice to have this optional feature. It might help to find out the reasons for issue #17.

xymaxim commented 7 months ago

The actual and expected outputs can be encoded into byte strings to assert with a nice diff output with literals corresponding to code points. The target encoding can be specified via an option, for example: --pm-encode-diff=”utf-8” (default).

Or do you prefer to have a hex dump instead, as stated in the title?

zaufi commented 7 months ago

Hexdumps could be nice to have for binary data (with unprintable chars)... e.g., for network packets of binary protocols.

xymaxim commented 7 months ago

Ah, I see. This sounds reasonable and desirable to have.