mirror of https://github.com/django/django.git
Refs #25677 -- Skipped an i18n test on older gettext versions.
This commit is contained in:
parent
479ba5add2
commit
93be2f7dea
|
@ -10,6 +10,8 @@ import unittest
|
||||||
from django.core.management import (
|
from django.core.management import (
|
||||||
CommandError, call_command, execute_from_command_line,
|
CommandError, call_command, execute_from_command_line,
|
||||||
)
|
)
|
||||||
|
from django.core.management.commands.makemessages import \
|
||||||
|
Command as MakeMessagesCommand
|
||||||
from django.core.management.utils import find_command
|
from django.core.management.utils import find_command
|
||||||
from django.test import SimpleTestCase, override_settings
|
from django.test import SimpleTestCase, override_settings
|
||||||
from django.test.utils import captured_stderr, captured_stdout
|
from django.test.utils import captured_stderr, captured_stdout
|
||||||
|
@ -173,6 +175,9 @@ class CompilationErrorHandling(MessageCompilationTests):
|
||||||
except CommandError as err:
|
except CommandError as err:
|
||||||
self.assertIn("'<EFBFBD>' cannot start a field name", six.text_type(err))
|
self.assertIn("'<EFBFBD>' cannot start a field name", six.text_type(err))
|
||||||
else:
|
else:
|
||||||
|
cmd = MakeMessagesCommand()
|
||||||
|
if cmd.gettext_version < (0, 18, 3):
|
||||||
|
raise unittest.SkipTest("python-brace-format is a recent gettext addition.")
|
||||||
with self.assertRaisesMessage(CommandError, "'<EFBFBD>' cannot start a field name"):
|
with self.assertRaisesMessage(CommandError, "'<EFBFBD>' cannot start a field name"):
|
||||||
call_command('compilemessages', locale=['ko'], verbosity=0)
|
call_command('compilemessages', locale=['ko'], verbosity=0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue