diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-01-23 21:06:00 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-01-23 21:07:46 +0100 |
commit | 059d6d300aa71b6c1a323f49daaa2068522f84ee (patch) | |
tree | 1041c5b4246585dfac4a105329b94fe58160cbf2 /tests | |
parent | e5137c7a985adfad0ba6aea805030973da3e04ca (diff) | |
download | clufter-059d6d300aa71b6c1a323f49daaa2068522f84ee.tar.gz clufter-059d6d300aa71b6c1a323f49daaa2068522f84ee.tar.xz clufter-059d6d300aa71b6c1a323f49daaa2068522f84ee.zip |
Separate loglevels for testruns and running from main-boostrap
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/_bootstrap.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/_bootstrap.py b/tests/_bootstrap.py index 8d321c0..c6fc0c7 100644 --- a/tests/_bootstrap.py +++ b/tests/_bootstrap.py @@ -5,9 +5,15 @@ """Bootstrap the environment for testing""" __author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>" -import logging -logging.basicConfig(level=logging.DEBUG) - from sys import path from os.path import dirname, abspath + + +if __name__ != 'main_bootstrap': + # if not run from main-bootstrap, verbose logging desired + from os import environ + import logging + logging.basicConfig() + logging.getLogger().setLevel(environ.get('LOGLEVEL', logging.DEBUG)) + path.insert(0, reduce(lambda x, y: dirname(x), xrange(3), abspath(__file__))) |