[Python-Dev] Unit testing (again)

M.-A. Lemburg mal@lemburg.com
Tue, 13 Feb 2001 22:33:21 +0100


Fredrik Lundh wrote:
> 
> > Cute:  Python changed the first line of its traceback output (used to say
> > "Traceback (innermost last):"), and current doctest wasn't expecting that.
> 
> which reminds me...  are there any chance of getting a doctest
> that can survives its own test suite under 1.5.2, 2.0, and 2.1?
> 
> the latest version blows up under 1.5.2 and 2.0:
> 
> *****************************************************************
> Failure in example: 1/0
> from line #155 of doctest
> Expected: ZeroDivisionError: integer division or modulo by zero
> Got: ZeroDivisionError: integer division or modulo
> 1 items had failures:
>    1 of   8 in doctest
> ***Test Failed*** 1 failures.

Since exception message are not defined anywhere I'd suggest
to simply ignore them in the output. 

About the traceback output format: how about adding some 
re support instead of using string.find() ?!

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/