From 2828399ba5cbb14502b023d4de1ba02f13dd5055 Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Fri, 28 Feb 2014 08:49:38 -0300 Subject: Imported Upstream version 6.3.0 --- tests/base.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'tests/base.py') diff --git a/tests/base.py b/tests/base.py index 00f7486..f3e3545 100644 --- a/tests/base.py +++ b/tests/base.py @@ -8,10 +8,16 @@ __all__ = ["BaseTestCase", "cd", "LocaleSupportInTesting"] -from contextlib import contextmanager -import locale + +# This code is so you can run the samples without installing the package, +# and should be before any import touching nikola, in any file under tests/ import os import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +from contextlib import contextmanager +import locale import unittest import logbook @@ -106,18 +112,18 @@ class LocaleSupportInTesting(object): if hasattr(cls, 'langlocales'): return defaults = { - 'linux': { + 'posix': { # non-windows defaults, must be two locales suported by .travis.yml 'default': ("en", str("en_US.utf8")), - 'other': ("es", str("es_ES.utf8")), + 'other': ("pl", str("pl_PL.utf8")), }, 'windows': { # windows defaults 'default': ("en", str("English")), - 'other': ("es", str("Spanish")), + 'other': ("pl", str("Polish")), }, } - os_id = 'windows' if sys.platform == 'win32' else 'linux' + os_id = 'windows' if sys.platform == 'win32' else 'posix' langlocales = {} for suffix in ['other', 'default']: try: -- cgit v1.2.3