From 700c36087aa8dbc7901621ed8cd08713679f1055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Thu, 15 Sep 2016 06:24:35 +0200 Subject: [PATCH] avocado.core.test: Log type when listing local vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It could be useful to see not only key/value pairs, but also their types. As the value could be pretty long this patch logs the type just after the key. Signed-off-by: Lukáš Doktor --- avocado/core/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avocado/core/test.py b/avocado/core/test.py index cbab55f6..3021d3ab 100644 --- a/avocado/core/test.py +++ b/avocado/core/test.py @@ -456,7 +456,8 @@ class Test(unittest.TestCase): stacktrace.log_message('Local variables:', logger='avocado.test') local_vars = inspect.trace()[1][0].f_locals for key, value in local_vars.iteritems(): - stacktrace.log_message(' -> %s: %s' % (key, value), + stacktrace.log_message(' -> %s %s: %s' + % (key, type(value), value), logger='avocado.test') finally: try: -- GitLab