summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-07-26 21:55:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-07-26 21:55:33 (GMT)
commitd05066d1eefcba422dbe3ebd50017905eac57af8 (patch)
treec131b1c9ce5f1c2018e3acc613eaa177c86a507c /Lib/test
parent0975dedfe08f46b76292d779b85cfe38a57cec9d (diff)
downloadcpython-d05066d1eefcba422dbe3ebd50017905eac57af8.zip
cpython-d05066d1eefcba422dbe3ebd50017905eac57af8.tar.gz
cpython-d05066d1eefcba422dbe3ebd50017905eac57af8.tar.bz2
Try to fix weird buildbot failures
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_codecs.py2
-rw-r--r--Lib/test/test_locale.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 247e2b8..7a9e38c 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1234,7 +1234,7 @@ class CodecsModuleTest(unittest.TestCase):
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
index 413c547..16689a3 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -393,18 +393,18 @@ class TestMiscellaneous(unittest.TestCase):
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():