#32762: test_msgfmt_error_including_non_ascii fails on Mac OS Catalina, 
localized
msgfmt binary.
--------------------------------------+------------------------------------
     Reporter:  niloct                |                    Owner:  nobody
         Type:  Bug                   |                   Status:  new
    Component:  Internationalization  |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

 * stage:  Unreviewed => Accepted


Comment:

 Super, thanks for the extra info.

 {{{
 $ LC_ALL="pt_BR.UTF-8" ./runtests.py i18n
 }}}

 Is sufficient to cause the failure. So the env update will fix it, as you
 say.


 {{{
 diff --git a/tests/i18n/test_compilation.py
 b/tests/i18n/test_compilation.py
 index 791c1d4f15..915d65e6e1 100644
 --- a/tests/i18n/test_compilation.py
 +++ b/tests/i18n/test_compilation.py
 @@ -193,7 +193,7 @@ class
 CompilationErrorHandling(MessageCompilationTests):
          # po file contains invalid msgstr content (triggers non-ascii
 error content).
          # Make sure the output of msgfmt is unaffected by the current
 locale.
          env = os.environ.copy()
 -        env.update({'LANG': 'C'})
 +        env.update({'LANG': 'C', 'LC_ALL': 'C'})
          with mock.patch('django.core.management.utils.run', lambda *args,
 **kwargs: run(*args, env=env, **kwargs)):
              cmd = MakeMessagesCommand()
              if cmd.gettext_version < (0, 18, 3):
 }}}


 Would you like to make a PR @niloct?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32762#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.0ba88c00add764838778153c341bc3ae%40djangoproject.com.

Reply via email to