# HG changeset patch # User domruf # Date 1494450852 -7200 # Node ID e62b8685868319cf98c1c9641f659d95ba1c0fb4 # Parent a9b169709aea7559b391a50d90a6e89bfa739867 tests: move time zone setup to pytest_configure Test setup stuff belongs in pytest_configure. diff -r a9b169709aea -r e62b86858683 kallithea/tests/base.py --- a/kallithea/tests/base.py Wed May 10 22:50:19 2017 +0200 +++ b/kallithea/tests/base.py Wed May 10 23:14:12 2017 +0200 @@ -23,14 +23,11 @@ from tg import config from webtest import TestApp -from kallithea import is_windows, model +from kallithea import model from kallithea.model.db import Notification, User, UserNotification from kallithea.model.meta import Session from kallithea.lib.utils2 import safe_str -os.environ['TZ'] = 'UTC' -if not is_windows: - time.tzset() log = logging.getLogger(__name__) diff -r a9b169709aea -r e62b86858683 kallithea/tests/conftest.py --- a/kallithea/tests/conftest.py Wed May 10 22:50:19 2017 +0200 +++ b/kallithea/tests/conftest.py Wed May 10 23:14:12 2017 +0200 @@ -2,6 +2,7 @@ import sys import logging import pkg_resources +import time from paste.deploy import loadwsgi from routes.util import URLGenerator @@ -21,6 +22,10 @@ from tg.util.webtest import test_context def pytest_configure(): + os.environ['TZ'] = 'UTC' + if not kallithea.is_windows: + time.tzset() + path = os.getcwd() sys.path.insert(0, path) pkg_resources.working_set.add_entry(path)