[Python-ideas] Official site-packages/test directory

Nick Coghlan ncoghlan at gmail.com
Mon Jan 22 21:54:32 EST 2018


On 20 January 2018 at 04:39, Chris Barker <chris.barker at noaa.gov> wrote:
> So maybe the way to go is to come up with recommendations for a standard way
> to do it -- maybe published by PyPa?

I don't think the trade-offs here are clear enough for us to add an
opinionated guide to packaging.python.org, but it could be an
appropriate topic for a discussion page (e.g. "Publishing Test
Suites") that frames the problem, and lays out some of the options for
handling it:

- tests published as part of the package (generally not ideal, but can
make post-install testing easier)
- tests in the sdist only (most suitable for unit tests)
- tests published as a separate package (often suitable for integration tests)

One of the things that makes the 3rd option a bit awkward currently is
that a lot of tools assume "1 repo -> 1 sdist", so splitting your test
suite out to its own sdist can be fairly annoying in practice.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list