From cfa1b9cce0c93a3115bbff3886c9bbcddd9e8047 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 21 Sep 2017 00:11:10 +0300 Subject: [PATCH] unittest: Show class name of test method. Makes output more compatible with CPython. --- unittest/unittest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/unittest.py b/unittest/unittest.py index ff5fd0c3..4d510938 100644 --- a/unittest/unittest.py +++ b/unittest/unittest.py @@ -184,7 +184,7 @@ 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=' ...') + print("%s (%s) ..." % (name, c.__qualname__), end="") m = getattr(o, name) set_up() try: