[pypy-dev] having broken the back of the unittest conversion problem ...

Armin Rigo arigo at tunes.org
Thu Jun 17 10:19:39 CEST 2004


Hello!

On Thu, Jun 17, 2004 at 08:44:42AM +0200, holger krekel wrote:
> > self.assertNotEquals(left, right) --> assert left != right
> > self.failIfEqual(left, right)     --> assert left != right

Maybe for consistency we should really use the operator implied in the name,
i.e.:

  self.assertNotEquals(left, right)   --> assert left != right
  self.failIfEqual(left, right)       --> assert not (left == right)

Just in case we really check specifically the __eq__ or __ne__ operators.

> > #def fail(self, msg=None):
> 
> doesn't exist in utest but will have to be re-added because we apparently
> use this in a few places.  Probably with 'from std.utest import fail'. 

raise AssertionError  could be the equivalent.


Armin



More information about the Pypy-dev mailing list