[New-bugs-announce] [issue10966] eliminate use of ImportError implicitly representing TestSkipped
report at bugs.python.org
Fri Jan 21 00:40:30 CET 2011
New submission from Brett Cannon <brett at python.org>:
test.regrtest considers an ImportError to be a test to skip. It then uses this info to decide what skipped tests were expected (or not) based on a list kepted in regrtest.py.
For detecting compiler failures, an ImportError should be a test error or failure. Tests for optional modules should instead raise TestSkipped directly if an import fails. Something like test.support.optional_import() should be created which raises TestSkipped if the requested module could not be imported. It could also be made optional based on the OS (not sure if it should be inclusive, exclusive, or either). That way the list of expected skips in regrtest.py can be moved into the individual test modules where it belongs.
stage: needs patch
title: eliminate use of ImportError implicitly representing TestSkipped
versions: Python 3.3
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce