1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Made (make|compile)messages check for availability of gettext commands.

Refs #19584.
This commit is contained in:
Ramiro Morales
2013-02-12 16:50:47 -03:00
parent 3f43f5f3b0
commit 7fca4416c7
6 changed files with 137 additions and 70 deletions

View File

@@ -131,8 +131,13 @@ class BasicExtractorTests(ExtractorTests):
os.chdir(self.test_dir)
shutil.copyfile('./code.sample', './code_sample.py')
stdout = StringIO()
management.call_command('makemessages', locale=LOCALE, stdout=stdout)
os.remove('./code_sample.py')
try:
management.call_command('makemessages', locale=LOCALE, stdout=stdout)
finally:
try:
os.remove('./code_sample.py')
except OSError:
pass
self.assertIn("code_sample.py:4", force_text(stdout.getvalue()))
def test_template_message_context_extractor(self):