From 252b73fb3ec3cfb6c5efb4b93db321eedd3745e1 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 26 Jul 2010 17:52:29 -0400 Subject: Skip the i18n test if the test language has not been built --- tests/test_ipalib/test_text.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_ipalib') 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 -- cgit