[Python-checkins] r46520 - in python/trunk: Doc/Makefile.deps Doc/lib/lib.tex Doc/lib/libfunctional.tex Doc/lib/libfunctools.tex Lib/test/test_functional.py Lib/test/test_functools.py Misc/NEWS Modules/_functoolsmodule.c Modules/functionalmodule.

Brett Cannon brett at python.org
Wed May 31 08:03:09 CEST 2006


On 5/30/06, Tim Peters <tim.peters at gmail.com> wrote:
>
> [Nick Coghlan]
> > ... (we should probably do something about that misleading ImportError
> ->
> > TestSkipped -> green buildbot behaviour. . . )
>
> I looked at that briefly a few weeks back and gave up.  Seemed the
> sanest thing was to entirely stop treating ImportError as "test
> skipped", and rewrite tests that legimately _may_ get skipped to catch
> expected ImportErrors and change them to TestSkipped themselves.
>
> A bit of framework might help; e.g., a test that expects to get
> skipped due to failing imports on some platforms could define a
> module-level list bound to a conventional name containing the names of
> the modules whose import failure should be treated as TestSkipped, and
> then regrtest.py could be taught to check import errors against the
> test module's list (if any).


Where would this list be stored?  If the import fails the module is not
imported, so how do you get access to the list?  It could be some function
that *must* be called before any imports that registers with
test.test_support what modules it can not be able to import and then check
that way.  Otherwise the list would just have to be external to all tests
(which might not be so bad to have a master list of modules we think can be
skipped on various platforms and then what modules can fail on import for
what tests).

-Brett

In the case du jour, test_functools.py presumably wouldn't define that
> list, so that any ImportError it raised would be correctly treated as
> test failure.
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-checkins/attachments/20060530/32a66316/attachment.htm 


More information about the Python-checkins mailing list