[Numpy-discussion] ANN: NumPy 1.2.0

Robert Kern robert.kern@gmail....
Mon Sep 29 13:49:26 CDT 2008

On Mon, Sep 29, 2008 at 13:43, Francesc Alted <faltet@pytables.org> wrote:

> Plain assert clauses used to be the most common way to check for test
> units in the original "unittest" module.  Later on, the authors started
> to introduce things like self.assert_() and family and warned that the
> use of the "assert" clause should be avoided (maybe thinking about
> possible changes in semantics inside Python itself, maybe thinking
> about the use of -OO).

Mostly it was reporting, I think. With assertEquals(x,y), you get a
nice message showing the values of x and y. This is obviated by nose,
which can introspect to get the values. From the unittest

  """These methods are used instead of the assert statement so the
test runner can accumulate all test results and produce a report."""

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Numpy-discussion mailing list