[PING][MERGE] cleanup locale tests for platforms with LC_CTYPE

John Arbash Meinel john at arbash-meinel.com
Thu Sep 7 23:34:45 BST 2006


John Arbash Meinel wrote:

>>> I need to update the test suite for the other bug, but lets see if we
>>> can get your tests passing first.
>>>
>>> Try the attached patch. (It includes the earlier patch)
>> It works now.
>>
> 
> Good. I submitted a patch to the mailing list for the other bug.
> 
> Attached is a patch which builds on the other patch, and does more work
> to clean up the environment, ensuring that the test actually tests what
> we want it to.
> 
> John
> =:->

Now that my run_bzr_subprocess changes were merged, I still want this to
get merged.

It also brings up another fix which we should probably do, though. Which
is that we set LANG when we spawn an external diff, but we don't set
LC_ALL, or LC_CTYPE. Should we be setting those as well?

John
=:->

> 
> 
> ------------------------------------------------------------------------
> 
> # Bazaar revision bundle v0.8
> #
> # message:
> #   Update locale tests to remove more env vars
> #   Some systems have LC_ALL or LC_CTYPE setup, which overrides LANG.
> #   Now we remove them, to give us a cleaner testing area.
> #   
> # committer: John Arbash Meinel <john at arbash-meinel.com>
> # date: Sat 2006-09-02 10:21:21.532999992 -0500
> 
> === modified file bzrlib/tests/blackbox/test_locale.py
> --- bzrlib/tests/blackbox/test_locale.py
> +++ bzrlib/tests/blackbox/test_locale.py
> @@ -43,7 +43,8 @@
>      def test_log_C(self):
>          out, err = self.run_bzr_subprocess('--no-aliases', '--no-plugins',
>                 '-q', 'log', '--log-format=long', 'tree',
> -               env_changes={'LANG':'C', 'BZR_PROGRESS_BAR':'none'})
> +               env_changes={'LANG':'C', 'BZR_PROGRESS_BAR':'none',
> +                            'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
>          self.assertEqual('', err)
>          self.assertEqualDiff("""\
>  ------------------------------------------------------------
> @@ -58,7 +59,8 @@
>      def test_log_BOGUS(self):
>          out, err = self.run_bzr_subprocess('--no-aliases', '--no-plugins',
>                 '-q', 'log', '--log-format=long', 'tree',
> -               env_changes={'LANG':'BOGUS', 'BZR_PROGRESS_BAR':'none'})
> +               env_changes={'LANG':'BOGUS', 'BZR_PROGRESS_BAR':'none',
> +                            'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
>          # XXX: This depends on the exact formatting of a locale.Error
>          # as the first part of the string. It may be a little tempermental
>          self.assertEqualDiff("""\
> 
> # revision id: john at arbash-meinel.com-20060902152121-2aa9f40fccfc8cb5
> # sha1: 4341dc9d49da9e18355becde1be0e727a1a6e200
> # inventory sha1: d25ba0f9214ae6437fa7fc7abbe390a522a1166b
> # parent ids:
> #   john at arbash-meinel.com-20060902151948-be48553dd9b43625
> # base id: john at arbash-meinel.com-20060902151948-be48553dd9b43625
> # properties:
> #   branch-nick: locale-35392
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060907/c9326d89/attachment.pgp 


More information about the bazaar mailing list