Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Rejecting this one for reasons we discussed earlier. The assertEqual() method
needs to be the primary interface. Everything else is starting to mix content
and presentation (i.e. passing in separators). The existing
R. David Murray rdmur...@bitdance.com added the comment:
Agreed on the closing. The pre-diff processing function would be a great
addition. For the record, I am currently satisfying my use case by doing this:
self.assertEqual(bstr1.split(b'\n'), bstr2.split(b'\n'))
which produces a very
Michael Foord mich...@voidspace.org.uk added the comment:
David - would you get a good approximation of what you want simply with:
self.assertEqual(ascii(first), ascii(second))
(This actually returns b'first' b'second' so you may want a convenience
function that chops the leading and
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: - rhettinger
nosy: +rhettinger
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10164
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Am discussing this with the OP on IRC and tabling it for a while so we can
better think out the API.
The goal is to let assertEqual(a, b) do straight-comparions of raw bytes, but
to give a nice looking diff (possibly
R. David Murray rdmur...@bitdance.com added the comment:
My best guess currently is that the failing test is a bug in difflib, but I
haven't dug into that code yet to prove it. It's still possible it's something
stupid in my code, but as far as I can see there's no character over where that
Changes by R. David Murray rdmur...@bitdance.com:
--
title: Add an assertBytesMultiLineEqual to unittest and use it for bytes
assertEqual - Add an assertBytesEqual to unittest and use it for bytes
assertEqual
___
Python tracker