[issue10966] eliminate use of ImportError implicitly representing SkipTest

Antoine Pitrou report at bugs.python.org
Thu Mar 24 23:00:00 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> The attached patch has both the code to make test skipping more
> obvious as well as eliminating the concept of expected skips.

I still don't like the idea that we have to hand-maintain lists of
"optional" or "required" platforms. It is not more manageable than the
list of "expected" tests.

For example:

-import_module('_ctypes')
+import_module('_ctypes', optional=['openbsd3', 'netbsd3'])

there are other platforms where _ctypes is not supported. We don't want
to maintain a list of them.

Same for:

+pty = import_module('pty',
+            optional=['win32', 'os2emx', 'freebsd4', 'freebsd5', 'freebsd6',
+                        'freebsd7', 'freebsd8'])

Do you want to keep track of the specificities of each version of the *BSDs?

I'm not sure why you have "optional" and "required_on". Either
"optional" and "required", or "optional_on" and "required_on", would be
more logical (the former looks less verbose to me).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10966>
_______________________________________


More information about the Python-bugs-list mailing list