[issue10164] Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual

R. David Murray report at bugs.python.org
Fri Oct 22 04:38:43 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

After talking with Michael on #python-dev, I've revised the patch to make it a real assertBytesEqual method rather than a pretend-the-bytes-are-strings method.  This version allows the byte strings to be split on an arbitrary byte string, which makes it more useful for getting diffs of structured binary data if that data has a convenient break point.  And the default is no splitting, which is what assertEqual uses when comparing bytes.

One of the tests is failing, and it's late and I can't figure out where the extra space is coming from.  Maybe someone else will check it out and spot the problem before I get back to it.

----------
Added file: http://bugs.python.org/file19331/assertBytesEqual.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10164>
_______________________________________


More information about the Python-bugs-list mailing list