Test framework of choice?

Andrew Dalke dalke at acm.org
Mon Jul 24 21:19:21 EDT 2000


Michael Hudson wrote:
>Well, there is one; it's Lib/test/regrtest.py starting from $(topdir).
>It's not all that great though (it's OK, but there's no easy way of
>using it outside the tree).  There's talk of sprucing it up/adopting a
>better framework but I don't think anyone has come up with comcrete
>plans yet.

We use regrtest at my previous company.  It worked pretty well.
The only big mod I had to make was to get the imports correct.
We had Python code in the top-level and the tests under "test/".
If the code was really a package, we needed to include ../..
in the PYTHONPATH, but if we simply added that to the path we
might accidentally include sister package.  So we needed to play
some tricks to make ".." act like the right package name.

The modified code, called br_regrtest, is included in the PyDaylight
package off my starship page (crew/dalke).

The other things is it's a different approach than the XP people
use.  We had a discussion about this on the biopython list.  The two
are isomorphic, but the XP approach makes it easier to tear out parts
of a test package for use elsewhere - the subcomponents are quite
independent.  On the other hand, the same can occur with the regrtest
design, but it doesn't place the same emphasis.  As to the reasons
for the XP approach, I'm still not sure.  I got the feeling that
XP's view was more like QA people use while regrtest was the developer's
viewpoint.  Need to learn more about XP...

                    Andrew
                    dalke at acm.org






More information about the Python-list mailing list