[Python-3000] [Python-Dev] Need help fixing failing Py3k Unittests in py3k-struni (original) (raw)

Steven Bethard steven.bethard at gmail.com
Wed Jul 11 00:38:53 CEST 2007


On 7/10/07, Christian Heimes <lists at cheimes.de> wrote:

Guido van Rossum wrote: > Please help!

I've made a meta patch that makes debugging the bugs a lot easier. It replaces assert(foo == bar) and failUnless(foo == bar) with failUnlessEqual(foo, bar). failUnlessEqual shows the value of foo and bar when they are not equal. http://www.python.org/sf/1751515 sed -r "s/self.assert((.*)\ ==/self.failUnlessEqual(\1,/" -i *.py sed -r "s/self.failUnless((.*)\ ==/self.failUnlessEqual(\1,/" -i *.py

Some of these look questionable, e.g.:

...

I'd probably go with something a little more restrictive, maybe:

r'self.assert_\(\S+ == \S+\)'

Something like that ought to have fewer false positives.

STeVe

I'm not in-sane. Indeed, I am so far out of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy



More information about the Python-3000 mailing list