diff options
| author | 2014-02-28 08:49:38 -0300 | |
|---|---|---|
| committer | 2014-02-28 08:49:38 -0300 | |
| commit | 2828399ba5cbb14502b023d4de1ba02f13dd5055 (patch) | |
| tree | 38012b6bacaa508ca56fb6f4ba87b912bb54b8c9 /tests/base.py | |
| parent | ca94afc07df55cb7fc6fe3b4f3011877b7881195 (diff) | |
Imported Upstream version 6.3.0upstream/6.3.0
Diffstat (limited to 'tests/base.py')
| -rw-r--r-- | tests/base.py | 18 |
1 files changed, 12 insertions, 6 deletions
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: |
