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 zach.ware
Recipients Arfrever, asvetlov, brett.cannon, chris.jerdonek, eric.araujo, ezio.melotti, michael.foord, pitrou, zach.ware
Date 2013-01-28.19:48:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's a patch that I believe nicely handles the raising of unittest.SkipTest at module level while doing test discovery.  It adds a _make_skipped_test function to unittest.loader, and an ``except case.SkipTest`` clause to TestLoader._find_tests.  For our own test package, this covers non-enabled resources as well.

Here's some example output:
P:\cpython>python -m unittest discover -v Lib/test/ "test_curs*"
test_curses (unittest.loader.ModuleSkipped) ... skipped "Use of the 'curses' res
ource not enabled"

Ran 1 test in 0.001s

OK (skipped=1)
[102289 refs, 38970 blocks]
Date User Action Args
2013-01-28 19:48:07zach.waresetrecipients: + zach.ware, brett.cannon, pitrou, ezio.melotti, eric.araujo, Arfrever, michael.foord, asvetlov, chris.jerdonek
2013-01-28 19:48:07zach.waresetmessageid: <>
2013-01-28 19:48:07zach.warelinkissue16935 messages
2013-01-28 19:48:07zach.warecreate