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

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Fri Jan 19 11:55:25 EST 2018

On 01/19/2018 05:48 PM, Guido van Rossum wrote:
> On Fri, Jan 19, 2018 at 8:30 AM, Wolfgang Maier 
> <wolfgang.maier at biologie.uni-freiburg.de 
> <mailto:wolfgang.maier at biologie.uni-freiburg.de>> wrote:
>     I think that's a really nice idea.
>     With an official site-packages/test directory there could be pip
>     support for optionally installing tests alongside a package if its
>     layout allows it. So end users could just install things without
>     tests, but developers could do: pip install <package> --with-tests
>     or something to get everything?
> Oh, I just realized there's another problem here. The existing 'test' 
> package (which is not a namespace package) would hide the 
> site-packages/test directory.

Well, that shouldn't be a big obstacle since one could just as well 
choose another name ( __tests__ for example?).
Alternatively, package-specific test directories could exist *inside* 
site-packages. So much like today's <package>.dist-info directories 
there could be <package>.test dirs?

More information about the Python-ideas mailing list