[issue19134] test_inspect.py failed if module _multiprocessing not available
Brett Cannon
report at bugs.python.org
Mon Sep 30 16:53:01 CEST 2013
Brett Cannon added the comment:
test.support.import_module is typically meant for global imports as function-level imports are discouraged in general. I would instead use the unittest.skipIf decorator::
@unittest.skipIf(not test.support.multiprocessing, "multiprocessing required")
def test_qualname_source(self):
...
----------
nosy: +brett.cannon
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19134>
_______________________________________
More information about the Python-bugs-list
mailing list