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 brett.cannon
Recipients brett.cannon, michael.foord
Date 2013-01-11.14:43:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
For test discovery to work where a dependent module is optional, you end up needing to do something like what is done in

-crypt = support.import_module('crypt')
+def setUpModule():
+    # this import will raise unittest.SkipTest if _crypt doesn't exist,
+    # so it has to be done in setUpModule for test discovery to work
+    global crypt
+    crypt = support.import_module('crypt')

That's kind of ugly. It would be better if unittest recognized SkipTest at import time during test discovery
Date User Action Args
2013-01-11 14:43:08brett.cannonsetrecipients: + brett.cannon, michael.foord
2013-01-11 14:43:08brett.cannonsetmessageid: <>
2013-01-11 14:43:08brett.cannonlinkissue16935 messages
2013-01-11 14:43:08brett.cannoncreate