Ticket #17054: 17054.patch

File 17054.patch, 2.5 KB (added by Aymeric Augustin, 13 years ago)
  • tests/regressiontests/i18n/commands/tests.py

     
    22import re
    33from subprocess import Popen, PIPE
    44
     5can_run_extraction_tests = False
     6can_run_compilation_tests = False
     7
    58def find_command(cmd, path=None, pathext=None):
    69    if path is None:
    710        path = os.environ.get('PATH', []).split(os.pathsep)
     
    3639    if match:
    3740        xversion = (int(match.group('major')), int(match.group('minor')))
    3841        if xversion >= (0, 15):
    39             from extraction import *
     42            can_run_extraction_tests = True
    4043    del p
    4144
    4245if find_command('msgfmt'):
    43     from compilation import *
     46    can_run_compilation_tests = True
  • tests/regressiontests/i18n/tests.py

     
    2222    get_language_info, get_language, get_language_from_request)
    2323
    2424
    25 from .commands.tests import NoWrapExtractorTests, IgnoredExtractorTests, MessageCompilationTests, PoFileTests, BasicExtractorTests, JavascriptExtractorTests, CopyPluralFormsExtractorTests, SymlinkExtractorTests, ExtractorTests
     25from .commands.tests import can_run_extraction_tests, can_run_compilation_tests
     26if can_run_extraction_tests:
     27    from .commands.extraction import (ExtractorTests, BasicExtractorTests,
     28        JavascriptExtractorTests, IgnoredExtractorTests, SymlinkExtractorTests,
     29        CopyPluralFormsExtractorTests, NoWrapExtractorTests)
     30if can_run_compilation_tests:
     31    from .commands.compilation import MessageCompilationTests, PoFileTests
    2632from .contenttypes.tests import ContentTypeTests
    2733from .forms import I18nForm, SelectDateForm, SelectDateWidget, CompanyForm
    2834from .models import Company, TestModel
    29 from .patterns.tests import URLRedirectWithoutTrailingSlashTests, URLTranslationTests, URLDisabledTests, URLTagTests, URLTestCaseBase, URLRedirectWithoutTrailingSlashSettingTests, URLNamespaceTests, URLPrefixTests, URLResponseTests, URLRedirectTests
     35from .patterns.tests import (URLRedirectWithoutTrailingSlashTests,
     36    URLTranslationTests, URLDisabledTests, URLTagTests, URLTestCaseBase,
     37    URLRedirectWithoutTrailingSlashSettingTests, URLNamespaceTests,
     38    URLPrefixTests, URLResponseTests, URLRedirectTests)
    3039from .test_warnings import DeprecationWarningTests
    3140
    3241
Back to Top