aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
commit0f1e24f7888ba16fe5629c57fd00f0deacb63e5e (patch)
tree7153a3a11b766f375b1d1c0a7adc599e0a9f9c55 /tests/base.py
parent04fc43563d3d5d4218004690b5e14c19c67bdcbc (diff)
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Merge tag 'upstream/6.3.0'
Upstream version 6.3.0
Diffstat (limited to 'tests/base.py')
-rw-r--r--tests/base.py18
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: