From 96a37a0266b3bf46491cc764e4096cc3bfeda6b3 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 14 Jul 2016 18:24:40 +0200 Subject: [1.10.x] Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names Thanks Tim Graham for the review. Backport of 3e71f6544feca490211e88db4f449dfdb7acce39 from master. --- tests/i18n/test_extraction.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index bad7c23051..0e4d7889fb 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -256,6 +256,10 @@ class BasicExtractorTests(ExtractorTests): self.assertIn("UnicodeDecodeError: skipped file not_utf8.txt in .", force_text(out.getvalue())) + def test_unicode_file_name(self): + open(os.path.join(self.test_dir, 'vidéo.txt'), 'a').close() + management.call_command('makemessages', locale=[LOCALE], verbosity=0) + def test_extraction_warning(self): """test xgettext warning about multiple bare interpolation placeholders""" os.chdir(self.test_dir) -- cgit v1.3