From 78cae43a32cfa7def822a17b40acafecab876817 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Wed, 13 Nov 2013 16:59:26 +0200 Subject: [PATCH] 7197: better diagnostics from test for debugging Use unittest -v/--verbose flag to trigger it. --- gramps/gen/datehandler/test/datehandler_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gramps/gen/datehandler/test/datehandler_test.py b/gramps/gen/datehandler/test/datehandler_test.py index eed7790a3..e3c97d646 100644 --- a/gramps/gen/datehandler/test/datehandler_test.py +++ b/gramps/gen/datehandler/test/datehandler_test.py @@ -34,8 +34,16 @@ Based on the Check Localized Date Displayer and Parser tool. # standard python modules # #------------------------------------------------------------------------- +from __future__ import unicode_literals, division import unittest +import sys +if '-v' in sys.argv or '--verbose' in sys.argv: + import logging + logging.getLogger('').addHandler(logging.StreamHandler()) + log = logging.getLogger(".Date") + log.setLevel(logging.DEBUG) + #------------------------------------------------------------------------- # # GRAMPS modules