Rev 4616: Make TestLocale.test_log_BOGUS more robust. in file:///home/vila/src/bzr/bugs/413514-bogus-locale/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Aug 17 23:16:49 BST 2009


At file:///home/vila/src/bzr/bugs/413514-bogus-locale/

------------------------------------------------------------
revno: 4616
revision-id: v.ladeuil+lp at free.fr-20090817221649-o7hmnfiip0jq16mv
parent: pqm at pqm.ubuntu.com-20090815123000-raj3s1ovqhy4abfs
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 413514-bogus-locale
timestamp: Tue 2009-08-18 00:16:49 +0200
message:
  Make TestLocale.test_log_BOGUS more robust. 
  
  * bzrlib/tests/blackbox/test_locale.py:
  (TestLocale.test_log_BOGUS): Make the test more robust (the
  important part is still tested, some of the deleted part is also
  tested in test_osutils_encodings).
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-08-15 09:15:03 +0000
+++ b/NEWS	2009-08-17 22:16:49 +0000
@@ -9,6 +9,12 @@
 In Development
 ##############
 
+Bug Fixes
+*********
+
+* Fix a test failure on karmic by making a locale test more robust.
+  (Vincent Ladeuil, #413514)
+
 Improvements
 ************
 

=== modified file 'bzrlib/tests/blackbox/test_locale.py'
--- a/bzrlib/tests/blackbox/test_locale.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_locale.py	2009-08-17 22:16:49 +0000
@@ -61,21 +61,7 @@
             '--no-aliases --no-plugins log -q --log-format=long tree',
                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("""\
-bzr: warning: unsupported locale setting
-  bzr could not set the application locale.
-  Although this should be no problem for bzr itself,
-  it might cause problems with some plugins.
-  To investigate the issue, look at the output
-  of the locale(1p) tool available on POSIX systems.
-bzr: warning: unsupported locale setting
-  Could not determine what text encoding to use.
-  This error usually means your Python interpreter
-  doesn't support the locale set by $LANG (BOGUS)
-  Continuing with ascii encoding.
-""", err)
+        self.assertStartsWith(err, 'bzr: warning: unsupported locale setting')
         self.assertEqualDiff("""\
 ------------------------------------------------------------
 revno: 1



More information about the bazaar-commits mailing list