[Python-checkins] cpython: Try to fix weird buildbot failures

antoine.pitrou python-checkins at python.org
Tue Jul 26 23:57:03 CEST 2011


http://hg.python.org/cpython/rev/0398f07d4827
changeset:   71510:0398f07d4827
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Jul 26 23:55:33 2011 +0200
summary:
  Try to fix weird buildbot failures

files:
  Lib/test/test_codecs.py |  2 +-
  Lib/test/test_locale.py |  6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1234,7 +1234,7 @@
     def test_lookup_issue1813(self):
         # Issue #1813: under Turkish locales, lookup of some codecs failed
         # because 'I' is lowercased as "ı" (dotless i)
-        oldlocale = locale.getlocale(locale.LC_CTYPE)
+        oldlocale = locale.setlocale(locale.LC_CTYPE)
         self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
         try:
             locale.setlocale(locale.LC_CTYPE, 'tr_TR')
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -393,18 +393,18 @@
 
     def test_getsetlocale_issue1813(self):
         # Issue #1813: setting and getting the locale under a Turkish locale
-        oldlocale = locale.getlocale()
+        oldlocale = locale.setlocale(locale.LC_CTYPE)
         self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
         try:
             locale.setlocale(locale.LC_CTYPE, 'tr_TR')
         except locale.Error:
             # Unsupported locale on this system
             self.skipTest('test needs Turkish locale')
-        loc = locale.getlocale()
+        loc = locale.getlocale(locale.LC_CTYPE)
         if verbose:
             print('got locale %a' % (loc,))
         locale.setlocale(locale.LC_CTYPE, loc)
-        self.assertEqual(loc, locale.getlocale())
+        self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
 
 
 def test_main():

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list