diff --git a/rhodecode/__init__.py b/rhodecode/__init__.py --- a/rhodecode/__init__.py +++ b/rhodecode/__init__.py @@ -46,6 +46,9 @@ __py_version__ = sys.version_info PLATFORM_WIN = ('Windows') PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS') +is_windows = __platform__ in PLATFORM_WIN +is_unix = __platform__ in PLATFORM_OTHERS + requirements = [ "Pylons==1.0.0", "Beaker==1.6.3", @@ -68,7 +71,7 @@ if __py_version__ < (2, 6): requirements.append("simplejson") requirements.append("pysqlite") -if __platform__ in PLATFORM_WIN: +if is_windows: requirements.append("mercurial>=2.2.1,<2.3") else: requirements.append("py-bcrypt") diff --git a/rhodecode/tests/__init__.py b/rhodecode/tests/__init__.py --- a/rhodecode/tests/__init__.py +++ b/rhodecode/tests/__init__.py @@ -21,13 +21,15 @@ from pylons import config, url from routes.util import URLGenerator from webtest import TestApp +from rhodecode import is_windows from rhodecode.model.meta import Session from rhodecode.model.db import User import pylons.test os.environ['TZ'] = 'UTC' -time.tzset() +if not is_windows: + time.tzset() log = logging.getLogger(__name__) @@ -71,6 +73,7 @@ NEW_GIT_REPO = 'vcs_test_git_new' HG_FORK = 'vcs_test_hg_fork' GIT_FORK = 'vcs_test_git_fork' + class TestController(TestCase): def __init__(self, *args, **kwargs):