[pypy-dev] Improved Unit Test Framework

Anthony Baxter anthony at interlink.com.au
Sun Oct 19 15:31:41 CEST 2003


>>> holger krekel wrote
> Yes, the distinction makes sense.  ASFAIK most testframeworks provide a
> much better testrunner but don't care that much about the actual
> unittest machinery (because it's hard to change, anyway :-).  As a side
> note, i think that the distinction between unit-tests and functional
> tests is not always practical. We certainly do a lot of more-or-less
> functional testing in PyPy.  Actually, a new testing module shouldn't
> need to worry about unit<->function tests too much. 

The Zope3 testrunner distinguishes between them - the unit tests live in 
subdirectories called 'test', while the functional tests live in 'ftest'.
The main problem with separating them in this way is that people forget
to run the functional tests. On the other hand, functional tests probably
need to derive from a different TestCase class, that defines a bunch of 
extra 'setup' (not setUp) methods. For instance, in quetzalcoatl, our 
ETL tool, functional tests have a bunch of machinery for establishing
database connections and the like. You don't want/need these in the unit
tests.

Anthony

-- 
Anthony Baxter     <anthony at interlink.com.au>   
It's never too late to have a happy childhood.



More information about the Pypy-dev mailing list