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 <1359402487.19.0.847089122119.issue16935@psf.upfronthosting.co.za>
In-reply-to
Content
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]
"""
History
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: <1359402487.19.0.847089122119.issue16935@psf.upfronthosting.co.za>
2013-01-28 19:48:07zach.warelinkissue16935 messages
2013-01-28 19:48:07zach.warecreate