summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-07-26 17:52:29 -0400
committerRob Crittenden <rcritten@redhat.com>2010-08-06 15:32:00 -0400
commit252b73fb3ec3cfb6c5efb4b93db321eedd3745e1 (patch)
tree2f25b3c02820f14553c0c2deb31a28795a303c50 /tests/test_ipalib
parentd885339f1cbf208b06c1eb26c49c60d11d62f1c3 (diff)
downloadfreeipa-252b73fb3ec3cfb6c5efb4b93db321eedd3745e1.tar.gz
freeipa-252b73fb3ec3cfb6c5efb4b93db321eedd3745e1.tar.xz
freeipa-252b73fb3ec3cfb6c5efb4b93db321eedd3745e1.zip
Skip the i18n test if the test language has not been built
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r--tests/test_ipalib/test_text.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_ipalib/test_text.py b/tests/test_ipalib/test_text.py
index ac156fe03..5cc518c13 100644
--- a/tests/test_ipalib/test_text.py
+++ b/tests/test_ipalib/test_text.py
@@ -22,10 +22,12 @@ Test the `ipalib.text` module.
"""
import re
+import nose
from tests.util import raises, assert_equal
from ipalib.request import context
from ipalib import request
from ipalib import text
+from ipapython.ipautil import file_exists
singular = '%(count)d goose makes a %(dish)s'
plural = '%(count)d geese make a %(dish)s'
@@ -86,6 +88,10 @@ def test_gettext():
# We need a translatable string to test with, read one from the
# test po file
+ if not file_exists(test_file):
+ raise nose.SkipTest(
+ 'Test language not available, run "make test_lang" in install/po'
+ )
msgid = get_msgid(test_file)
# Get the localized instance of the msgid, it should be a Gettext