1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Rearranged some i18n tests

Compilation/extraction tests are now properly skipped when gettext
commands are unavailable.
This commit is contained in:
Claude Paroz
2013-10-28 14:17:48 +01:00
parent 35db9d58d6
commit 0336d0d95e
3 changed files with 12 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ import pickle
from threading import local
from django.conf import settings
from django.core.management.utils import find_command
from django.template import Template, Context
from django.template.base import TemplateSyntaxError
from django.test import TestCase, RequestFactory
@@ -34,16 +33,6 @@ from django.utils.translation import (activate, deactivate,
npgettext, npgettext_lazy,
check_for_language)
if find_command('xgettext'):
from .commands.extraction import (ExtractorTests, BasicExtractorTests,
JavascriptExtractorTests, IgnoredExtractorTests, SymlinkExtractorTests,
CopyPluralFormsExtractorTests, NoWrapExtractorTests,
LocationCommentsTests, KeepPotFileExtractorTests,
MultipleLocaleExtractionTests)
if find_command('msgfmt'):
from .commands.compilation import (PoFileTests, PoFileContentsTests,
PercentRenderingTests, MultipleLocaleCompilationTests,
CompilationErrorHandling)
from .forms import I18nForm, SelectDateForm, SelectDateWidget, CompanyForm
from .models import Company, TestModel