From 5e1f596200718a5b181c8f309e8acba0d3d2b9d7 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 3 Jul 2014 17:38:41 -0400 Subject: [PATCH] Unit Tests - Added a 'diag' method to the Python test class. --- test/basetest/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/basetest/__init__.py b/test/basetest/__init__.py index 10dfb5fb9..d4d0ee03c 100644 --- a/test/basetest/__init__.py +++ b/test/basetest/__init__.py @@ -159,5 +159,13 @@ class BaseTestCase(unittest.TestCase): assert out[0] != 0, "Task finished with zero exit (0) code" return out + @classmethod + def diag(cls, out): + """Diagnostics are just lines preceded with #. + """ + print '# --- diag start ---' + for line in out.split("\n"): + print '#', line + print '# --- diag end ---' # vim: ai sts=4 et sw=4