Ticket #23840: 23840-test.diff

File 23840-test.diff, 1.1 KB (added by Claude Paroz, 10 years ago)

Failing test

  • tests/i18n/test_extraction.py

    diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py
    index b297210..70b750c 100644
    a b class BasicExtractorTests(ExtractorTests):  
    343343            six.assertRegex(self, po_contents, r'#\..+Translators: valid i18n comment #9')
    344344            self.assertMsgId("Translatable literal #9j", po_contents)
    345345
     346    def test_makemessages_find_files(self):
     347        """
     348        Test that find_files only discover files having the proper extensions.
     349        """
     350        from django.core.management.commands.makemessages import Command
     351        cmd = Command()
     352        cmd.ignore_patterns = ['CVS', '.*', '*~', '*.pyc']
     353        cmd.symlinks = False
     354        cmd.verbosity = 0
     355        cmd.locale_paths = []
     356        cmd.default_locale_path = os.path.join(self.test_dir, 'locale')
     357        found_files = cmd.find_files(self.test_dir)
     358        found_exts = set([os.path.splitext(tfile.file)[1] for tfile in found_files])
     359        self.assertEqual(found_exts.difference({'.py', '.html', '.txt', '.js'}), set())
     360
    346361
    347362class JavascriptExtractorTests(ExtractorTests):
    348363
Back to Top