diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..c68f6f5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,10 @@ +# Hack to enable debug-level logging when running tests +# with `python3 -m unittest discover` + +import sys +if 'unittest' in sys.modules: + import logging + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S')