mirror of https://github.com/zulip/zulip.git
Show skipped tests in test runner.
This commit is contained in:
parent
5de91c4115
commit
0a9c600c8b
|
@ -109,8 +109,8 @@ def run_test(test):
|
|||
test.setUp()
|
||||
try:
|
||||
test_method()
|
||||
except unittest.SkipTest:
|
||||
pass
|
||||
except unittest.SkipTest as e:
|
||||
print('Skipped:', e)
|
||||
except Exception:
|
||||
failed = True
|
||||
traceback.print_exc()
|
||||
|
@ -155,7 +155,10 @@ class Runner(DiscoverRunner):
|
|||
# type: (Iterable[TestCase], bool) -> bool
|
||||
failed = False
|
||||
for test in suite:
|
||||
if run_test(test):
|
||||
# The attributes __unittest_skip__ and __unittest_skip_why__ are undocumented
|
||||
if hasattr(test, '__unittest_skip__') and test.__unittest_skip__:
|
||||
print('Skipping', full_test_name(test), "(%s)" % (test.__unittest_skip_why__,))
|
||||
elif run_test(test):
|
||||
failed = True
|
||||
if fatal_errors:
|
||||
return failed
|
||||
|
|
Loading…
Reference in New Issue