[Python-Dev] [Python-checkins] r85739 - in python/branches/issue4388/Lib/test: script_helper.py test_cmd_line.py

Nick Coghlan ncoghlan at gmail.com
Wed Oct 20 15:47:25 CEST 2010


On Wed, Oct 20, 2010 at 10:06 PM, victor.stinner
<python-checkins at python.org> wrote:
> Modified: python/branches/issue4388/Lib/test/test_cmd_line.py
> ==============================================================================
> --- python/branches/issue4388/Lib/test/test_cmd_line.py (original)
> +++ python/branches/issue4388/Lib/test/test_cmd_line.py Wed Oct 20 14:06:46 2010
> @@ -103,8 +103,15 @@
>         if sys.getfilesystemencoding() != 'ascii':
>             if test.support.verbose:
>                 import locale
> +                env = os.environ.copy()
> +                for key in ('LC_ALL', 'LC_CTYPE', 'LANG'):
> +                    try:
> +                        del env[key]
> +                    except KeyError:
> +                        pass
>                 print('locale encoding = %s, filesystem encoding = %s'
> -                      % (locale.getpreferredencoding(), sys.getfilesystemencoding()))
> +                      % (locale.getpreferredencoding(), sys.getfilesystemencoding()),
> +                      env=env)
>             command = "assert(ord('\xe9') == 0xe9)"
>             assert_python_ok('-c', command)

Isn't that "env=env" argument meant to be down in the call to
assert_python_ok, not in the print call? (your next checkin didn't
change this)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list