diff options
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: |
