This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients brett.cannon, eric.araujo, michael.foord, zach.ware
Date 2013-01-11.16:29:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
FTR there is already an alternative to setupmodule:

    import module
except ImportError:
    module = None

@unittest.skipUnless(module, 'requires module')
class ModuleTests(unittest.TestCase):

This idiom is more lines than support.import_module, but works for non-stdlib tests too, and is useful when you don’t want the whole file to be skipped if the module is missing (like in distutils’ test_sdist where zlib can be missing).
Date User Action Args
2013-01-11 16:29:12eric.araujosetrecipients: + eric.araujo, brett.cannon, michael.foord, zach.ware
2013-01-11 16:29:12eric.araujosetmessageid: <>
2013-01-11 16:29:12eric.araujolinkissue16935 messages
2013-01-11 16:29:11eric.araujocreate