[Pyunit-interest] Re: PATCH: AssertionError message
Brought to you by:
purcell
From: Steve P. <ste...@ya...> - 2002-06-04 06:18:08
|
A similar patch is actually in the PyUnit CVS already, and appears to be in the standard-library version of PyUnit shipped with Python 2.2, though not 2.1. The new code looks like this: def failUnlessEqual(self, first, second, msg=None): """Fail if the two objects are unequal as determined by the '!=' operator. """ if first != second: raise self.failureException, \ (msg or '%s != %s' % (`first`, `second`)) def failIfEqual(self, first, second, msg=None): """Fail if the two objects are equal as determined by the '==' operator. """ if first == second: raise self.failureException, \ (msg or '%s == %s' % (`first`, `second`)) Is anyone interested in a fresh standalone release of PyUnit soon? I had guessed that most people have moved to Python 2.x by now, but maybe I'm mistaken? Best wishes to all, -Steve |