diff options
| author | Jannis Leidel <jannis@leidel.info> | 2012-02-04 18:27:24 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2012-02-04 18:27:24 +0000 |
| commit | c6065545ef127ef244defd520b2bb1afe3a5c153 (patch) | |
| tree | 991818058e9904369fb7acb843c7c8c298ca5c25 /tests/regressiontests | |
| parent | 62dc16dcd8664d43b6e136156a6f853efe625cfd (diff) | |
Fixed #17628 -- Extended makemessages command to also ignore directories when walking, not only when looking for files. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/i18n/commands/extraction.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/regressiontests/i18n/commands/extraction.py b/tests/regressiontests/i18n/commands/extraction.py index b1fc0025c7..4eb7abc7f0 100644 --- a/tests/regressiontests/i18n/commands/extraction.py +++ b/tests/regressiontests/i18n/commands/extraction.py @@ -4,6 +4,7 @@ from __future__ import with_statement import os import re import shutil +from StringIO import StringIO from django.core import management from django.test import TestCase @@ -177,7 +178,11 @@ class IgnoredExtractorTests(ExtractorTests): def test_ignore_option(self): os.chdir(self.test_dir) pattern1 = os.path.join('ignore_dir', '*') - management.call_command('makemessages', locale=LOCALE, verbosity=0, ignore_patterns=[pattern1]) + stdout = StringIO() + management.call_command('makemessages', locale=LOCALE, verbosity=2, + ignore_patterns=[pattern1], stdout=stdout) + data = stdout.getvalue() + self.assertTrue("ignoring directory ignore_dir" in data) self.assertTrue(os.path.exists(self.PO_FILE)) with open(self.PO_FILE, 'r') as fp: po_contents = fp.read() |
