Changeset - e62b86858683
[Not reviewed]
default
0 2 0
domruf - 9 years ago 2017-05-10 23:14:12
dominikruf@gmail.com
tests: move time zone setup to pytest_configure

Test setup stuff belongs in pytest_configure.
2 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/base.py
Show inline comments
 
@@ -23,14 +23,11 @@ import time
 
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__)
 

	
kallithea/tests/conftest.py
Show inline comments
 
@@ -2,6 +2,7 @@ import os
 
import sys
 
import logging
 
import pkg_resources
 
import time
 

	
 
from paste.deploy import loadwsgi
 
from routes.util import URLGenerator
 
@@ -21,6 +22,10 @@ import kallithea.tests.base # FIXME: nee
 
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)
0 comments (0 inline, 0 general)