[Python-Dev] Location of tests for packages

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jan 25 19:16:07 CET 2011


On Tue, Jan 25, 2011 at 12:38 PM, Brett Cannon <brett at python.org> wrote:
>.. If we move some modules and not others purely because some
> distros choose not to ship e.g., ctypes and sqlite3

I don't see why this is a problem.  Regrtest already has a mechanism
that allows skipping tests based on various criteria.  This mechanism
works for both packages and flat modules that can be optionally
installed.

FWIW, I am +0 on consolidating tests under Lib/test.  One of the
reasons that I have not seen mentioned is that it is well-known that
test package is not part of the official stdlib API and can be
changes/restructured in backward incompatible ways. It is not obvious
whether the same applies to say lib2to3.tests or ctypes.test.

If you are interested to see what it takes to move tests from a
package, I moved json tests to Lib/test/json_tests in r86875.  It is
not hard, but does require some changes to imports.


More information about the Python-Dev mailing list