From d3fe0957b867b9e0487d6d0d1ec61b5ca4d0608e Mon Sep 17 00:00:00 2001 From: Tom Soulanille Date: Fri, 7 Aug 2015 14:41:32 -0400 Subject: [PATCH] unittest: print test name before execution --- unittest/unittest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unittest/unittest.py b/unittest/unittest.py index 5ae65222..1fd6a2c0 100644 --- a/unittest/unittest.py +++ b/unittest/unittest.py @@ -119,15 +119,16 @@ def run_class(c, test_result): tear_down = getattr(o, "tearDown", lambda: None) for name in dir(o): if name.startswith("test"): + print(name, end=' ...') m = getattr(o, name) try: set_up() test_result.testsRun += 1 m() tear_down() - print(name, "...ok") + print(" ok") except SkipTest as e: - print(name, "...skipped:", e.args[0]) + print(" skipped:", e.args[0]) test_result.skippedNum += 1