[TIP] Guidelines for where to put tests & how to package them

C. Titus Brown ctb at msu.edu
Thu Feb 25 05:53:28 PST 2010


On Thu, Feb 25, 2010 at 09:23:50AM +0100, Micha? Kwiatkowski wrote:
> On Thu, Feb 25, 2010 at 6:01 AM, C. Titus Brown <ctb at msu.edu> wrote:
> > I've produced a simple draft proposal & example where you put your unit tests
> > under a package dir, somepackage/tests/.
> >
> > You can run these tests with
> >
> > ?% python -m somepackage.tests.run
> >
> > and you can also do (if setuptools/distribute is installed)
> >
> > ?% python setup.py test
> >
> > ---
> >
> > Full source at http://github.com/ctb/SomePackage or downloadable
> > at
> >
> > ? http://lyorn.idyll.org/~t/transfer/SomePackage.tar.gz
> >
> > Comments? ?Thoughts? ?Complaints? ?Issues I missed?
> 
> Where the integration tests (i.e. those using multiple packages of a
> single project) go?

Hi Michal,

I'm not sure.  I don't have much experience with that.  What do you suggest?

If you had an overall "container" package you could put them in there --
no reason that you couldn't have test packages be interdependent, right?

Or you could just say that integration tests should not be run after install,
and then have 'python setup.py test' do the honors for developers.

cheers,
--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the testing-in-python mailing list