[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.

Tim Peters tim.peters at gmail.com
Wed May 31 03:35:07 CEST 2006


[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).

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.


More information about the Python-checkins mailing list