Zachary Ware added the comment:

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]
"""

----------
keywords: +patch
Added file: http://bugs.python.org/file28884/issue16935.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16935>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to