uche.ogbuji at fourthought.com
Thu Jul 26 01:08:35 MDT 2001
Steve Purcell wrote:
> Hi Sean (and other folk),
> Sean Reifschneider wrote:
> > [snip]
> > self.failIf(mult(0, 100) != 100)
> > [snip]
> > Which is better than what I expected, I was expecting to have to do, in
> > effect:
> > res = mult(0, 100)
> > exRes = 100
> > self.failIf(res != exRes, 'Expected %s, got %s' % ( res, exRes ))
> > But, I still don't like that the test aborts when it runs into a failure
> > (unless you make every test it's own suite?), and that you don't get the
> > expected value as well as what was actually produced. Both of which you
> > get from doctest.
> What *should* a test case do if it runs into a failure? It *has* to stop.
I agree strongly with Sean.
4Suite has almost 600 test files, making up over 2000 test cases. It is
very rare that it can get through *all* of them without incident. Often
we'll have to tolerate a particular failure in a process of triage.
Our current, home-grown test suite notes all failures by default, but
does not abort. At the end it gives a report of all failures. There is
also an option to abort on failure.
We've been mulling over porting to PyUnit, but I fear it's a non-starter
if it won't let us continue on failure of a test case.
Uche Ogbuji Principal Consultant
uche.ogbuji at fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Boulder, CO 80301-2537, USA
XML strategy, XML tools (http://4Suite.org), knowledge management
More information about the FRPythoneers