tests should use C locale

Bug #969468 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned
Breezy
Fix Released
Low
Unassigned

Bug Description

the tests currently rely on particular strings not being translated. for example, I have LC_ALL=de_DE and I now see some failures:

Traceback (most recent call last):
  File "/home/jelmer/src/bzr/bzrlib/tests/blackbox/test_exceptions.py", line 69, in test_utf8_default_fs_enc
    self.assertContainsRe(out, "^Created a standalone tree .*$")
AssertionError: pattern "^Created a standalone tree .*$" not found in
"""\
Ein standalone tree wurde erstellt (Format: 2a)
"""

We should probably force the locale to be C during the tests.

Tags: selftest
Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 969468] [NEW] tests should use C locale

Jelmer Vernooij пишет:
> We should probably force the locale to be C during the tests.

In QBzr and bzr-explorer we explicitly disable i18n during tests. You
don't have to force C locale, just disable i18n.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> Jelmer Vernooij пишет:
> > We should probably force the locale to be C during the tests.
> In QBzr and bzr-explorer we explicitly disable i18n during tests. You
> don't have to force C locale, just disable i18n.
Uhm, isn't that the same thing, at least where translations are concerned?

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 969468] Re: tests should use C locale

Jelmer Vernooij пишет:
>> Jelmer Vernooij пишет:
>>> We should probably force the locale to be C during the tests.
>> In QBzr and bzr-explorer we explicitly disable i18n during tests. You
>> don't have to force C locale, just disable i18n.
> Uhm, isn't that the same thing, at least where translations are concerned?

I think it's different things. Forcing C locale will affect how
unicode tests behave in bzrlib, but disabling i18n just forces English
messages, but does not affect unicode.

--
All the dude wanted was his rug back

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 31/03/12 15:00, schrieb Alexander Belchenko:
> Jelmer Vernooij пишет:
>>> Jelmer Vernooij пишет:
>>>> We should probably force the locale to be C during the tests.
>>> In QBzr and bzr-explorer we explicitly disable i18n during tests. You
>>> don't have to force C locale, just disable i18n.
>> Uhm, isn't that the same thing, at least where translations are concerned?
> I think it's different things. Forcing C locale will affect how
> unicode tests behave in bzrlib, but disabling i18n just forces English
> messages, but does not affect unicode.
I agree, we shouldn't override the terminal encoding.

However, the locale does matter for more than just translations. For
example, it determines how dates are formatted.

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
Changed in bzr:
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
tags: added: selftest
Jelmer Vernooij (jelmer)
Changed in brz:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.