diff --git a/scopes/office/tests/config.py b/scopes/office/tests/config.py index 2ef3085..24895ae 100644 --- a/scopes/office/tests/config.py +++ b/scopes/office/tests/config.py @@ -9,14 +9,6 @@ log_level = logging.INFO log_format = '%(asctime)s %(levelname)s %(name)s %(message)s' log_dateformat = '%Y-%m-%dT%H:%M:%S' -def setup_logging(): - hdlr = logging.getLogger().handlers[-1] - logging.getLogger().removeHandler(hdlr) # remove NullHandler added by testrunner - logging.basicConfig(filename=log_file, level=log_level, - format=log_format, datefmt=log_dateformat) - -setup_logging() - # SQLite dbengine = 'sqlite' dbname = 'scopes/office/tests/var/test.db' diff --git a/scopes/office/tests/test_office.py b/scopes/office/tests/test_office.py index 66d468b..31d6b10 100644 --- a/scopes/office/tests/test_office.py +++ b/scopes/office/tests/test_office.py @@ -7,8 +7,11 @@ sys.path = [os.path.dirname(__file__)] + sys.path import unittest +from scopes.tests.util import setup_logging from scopes.storage.common import StorageFactory import config + +setup_logging(config) config.storageFactory = StorageFactory(config)