A better unittest
Steven Taschuk
staschuk at telusplanet.net
Wed Apr 16 16:50:11 EDT 2003
Quoth Terry Reedy:
[...]
> I like having the actual values too. It should make debugging an
> unexpected failure easier. But what if each value is more that a few
> bytes? Example (from my future plans): two lists of all permutations
> of range(8), one produced by an obvious recursion and the other by a
> much less obvious iteration.
Now and then I replace
self.assertEquals(longlist1, longlist2)
with
map(self.assertEquals, longlist1, longlist2)
It's not quite ideal; in some cases it would be nice to see the
index of the mismatch too, for example.
--
Steven Taschuk staschuk at telusplanet.net
"Its force is immeasurable. Even Computer cannot determine it."
-- _Space: 1999_ episode "Black Sun"
More information about the Python-list
mailing list