[Python-Dev] Cleaning-up the new unittest API (original) (raw)
R. David Murray rdmurray at bitdance.com
Sat Oct 30 20:24:10 CEST 2010
- Previous message: [Python-Dev] Cleaning-up the new unittest API
- Next message: [Python-Dev] Cleaning-up the new unittest API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 30 Oct 2010 18:36:45 +0200, Antoine Pitrou <solipsis at pitrou.net> wrote:
On Sat, 30 Oct 2010 12:02:27 -0400 "R. David Murray" <rdmurray at bitdance.com> wrote: > > I don't disagree with this simplification, but given that you all want > to pare down the unittest API, I'd be interested in your opinions on > issue 10164. Because the assertBytesEqual method takes an optional > argument, it seems like it would need to be documented, even though > it would in a lot of cases just be used through assertEqual.
The optional argument doesn't look very useful. I imagine there are plenty of special cases where you could need custom splitting of bytestrings on a given byte, a regexp pattern, or along some fixed chunk length, but they are special cases.
Well, I have a specific special case I need it for: comparing byte strings that are wire-format email messages. Considering how much of a pain it was to get right, I'd hate to see people have to reimplement the guts of it for each special case. Maybe a 'make_chunks' argument that takes a function that returns a list?
-- R. David Murray www.bitdance.com
- Previous message: [Python-Dev] Cleaning-up the new unittest API
- Next message: [Python-Dev] Cleaning-up the new unittest API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]