[Distutils] test suite support

Achim Gaedke Achim.Gaedke@uni-koeln.de
Tue Jan 15 18:01:01 2002


I'd like to have unittest support, because it seems to me comfortable to =
unify
testsuites and easy to adapt own existing tests, but I have not enough
experience to write good code for this purpose.

I suggest two changes to Thomas code:

* Use unittest.main(module) for test execution and
* prepend the build-directory used by build and build_ext to sys.path, so=
 the
new modules are found. That is important for c-code.

Some links for unittest:
Homepage: http://pyunit.sourceforge.net/
Python Docs: http://www.python.org/doc/current/lib/module-unittest.html

Paul Moore schrieb:
>=20
> On Tue, 15 Jan 2002 19:46:41 +0100, "Thomas Heller"
> <thomas.heller@ion-tof.com> wrote:
>=20
> >From: "M.-A. Lemburg" <mal@lemburg.com>
> >>
> >> Why not add this as new "test" command to distutils ?! It could have
> >> options which programmers can then set in order for the command to f=
ind
> >> the test suits to run, e.g.
> >>
> >> python setup.py test
> >>
> >> I'd suggest to use an approach similar to what build_ext and the
> >> Extension class have to offer (in terms of code design).
> >>
> >I've used the following code which was posted by Berthold H=F6llmann
> >to this list with good success in several of my setup scripts...
> [...]
>=20
> I strongly support *any* form of a test command. I think that this is
> very important, to encourage people to provide test suites with their
> distributions.
>=20
> The problem, to some extent, is that there are too many "home-grown"
> solutions. We just need one version, added to the "official"
> distribution.
>=20
> Can Thomas' version be added to CVS, so that it gets into Python 2.3?
> It's a real shame, in retrospect, that this didn't get done for 2.2. If
> not Thomas' version, then can someone provide a version? But this is
> very definitely a case where anything is better than nothing...
>=20
> Paul.
>=20
> (Sorry, I campaigned about this a long while ago, but I let it drop. I
> shouldn't have.)
>=20
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> http://mail.python.org/mailman/listinfo/distutils-sig