Merge lp:~vila/bzr/413514-bogus-locale into lp:~bzr/bzr/trunk-old

Proposed by Vincent Ladeuil
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vila/bzr/413514-bogus-locale
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 43 lines
To merge this branch: bzr merge lp:~vila/bzr/413514-bogus-locale
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+10287@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Pretty simple: as explained in #413514 comments, this:
- is specific to karmic which slightly change python behavior when a bogus LANG is specified,
- was already identified as a britle test,
- can be simplified since the important part (among the deleted ones) is covered by
  another test in test_utils_encoding.

Revision history for this message
Robert Collins (lifeless) wrote :

review +1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-08-18 01:38:56 +0000
3+++ NEWS 2009-08-18 08:35:57 +0000
4@@ -9,6 +9,12 @@
5 In Development
6 ##############
7
8+Bug Fixes
9+*********
10+
11+* Fix a test failure on karmic by making a locale test more robust.
12+ (Vincent Ladeuil, #413514)
13+
14 Improvements
15 ************
16
17
18=== modified file 'bzrlib/tests/blackbox/test_locale.py'
19--- bzrlib/tests/blackbox/test_locale.py 2009-03-23 14:59:43 +0000
20+++ bzrlib/tests/blackbox/test_locale.py 2009-08-18 08:35:57 +0000
21@@ -61,21 +61,7 @@
22 '--no-aliases --no-plugins log -q --log-format=long tree',
23 env_changes={'LANG':'BOGUS', 'BZR_PROGRESS_BAR':'none',
24 'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
25- # XXX: This depends on the exact formatting of a locale.Error
26- # as the first part of the string. It may be a little tempermental
27- self.assertEqualDiff("""\
28-bzr: warning: unsupported locale setting
29- bzr could not set the application locale.
30- Although this should be no problem for bzr itself,
31- it might cause problems with some plugins.
32- To investigate the issue, look at the output
33- of the locale(1p) tool available on POSIX systems.
34-bzr: warning: unsupported locale setting
35- Could not determine what text encoding to use.
36- This error usually means your Python interpreter
37- doesn't support the locale set by $LANG (BOGUS)
38- Continuing with ascii encoding.
39-""", err)
40+ self.assertStartsWith(err, 'bzr: warning: unsupported locale setting')
41 self.assertEqualDiff("""\
42 ------------------------------------------------------------
43 revno: 1