python-minimal test suite
Matthias Klose
m at klose.in-berlin.de
Mon Jan 17 19:01:02 CST 2005
Am Dienstag, den 11.01.2005, 12:51 -0800 schrieb Matt Zimmerman:
> On Mon, Jan 10, 2005 at 08:47:57AM +0100, Matthias Klose wrote:
>
> > - the separate test suite run for the python-minimal modules works, but
> > the test cases and testsuite need more modules than are contained in
> > python minimal. The approach taken is to modify each test case to import
> > the needed modules:
> >
> > import sys
> > sys.path.append(<path with all modules>)
> > import <module not in -minimal>
> > sys.path.append(<path with all modules>)
> > del sys
> >
> > after a test run, the imported modules have to be removed from
> > sys.modules. Unfortunately unloading the modules doesn't work for every
> > module, so you end up with test cases in the test suite, where an import
> > succeeds, because the module is already imported, but not in sys.path
> > (anymore).
> >
> > The approach to patch all tests works, but seems to be a maintainance
> > burden. There are however some results: time.strptime is currently
> > unusable in -minimal. The C extension imports the _strptime module,
> > depending on gettext, locale and _locale, copy, calendar. Having locale
> > imported and referring to encodings, we will end up including these in
> > -minimal as well. What to do?
> > 1) Include all the referenced modules (150k).
> > 2) Write a time.strptime, based on the C implementation, handling the
> > same as the
> > Python implementation does.
> > 3) Document it and leave it unimplemented.
> > First solution can be taken by adding the modules, but increases the
> > size of -minimal, second solution maybe adds some incompatibilities,
> > when the complete module set is not available. Third thing could be a
> > solution, if it's documented somewhere.
> >
> > For the test of -minimal it should be sufficient to specify a list of
> > tests from the complete testsuite, which have to pass or else the build
> > of the package will fail.
>
> I agree, I don't think it makes sense to patch the tests.
>
> 150k is for the dependencies of time.strptime, yes?
correct.
> How large are the dependencies of the test suite itself?
the size of the whole library, as the test suite is supposed to test the
whole library ;)
> > Another outcome: copy and operator are used very often in the testsuite,
> > so maybe add them to -minimal as well.
>
> How big are they?
copy.py is 10k, operator.so 20k.
Matthias
More information about the ubuntu-devel
mailing list