]> granicus.if.org Git - python/commitdiff
Issue #14113: Fix a test_strptime failure caused by changes to LC_ALL.
authorStefan Krah <skrah@bytereef.org>
Mon, 27 Feb 2012 09:18:51 +0000 (10:18 +0100)
committerStefan Krah <skrah@bytereef.org>
Mon, 27 Feb 2012 09:18:51 +0000 (10:18 +0100)
Lib/test/test_format.py

index dc324af412930edbc6bd9119406f986ef4cc4fa3..d43cea313940fc49134c70e3623ce0b55ab623e1 100644 (file)
@@ -285,7 +285,8 @@ class FormatTest(unittest.TestCase):
 
     def test_locale(self):
         try:
-            oldloc = locale.setlocale(locale.LC_ALL, '')
+            oldloc = locale.setlocale(locale.LC_ALL)
+            locale.setlocale(locale.LC_ALL, '')
         except locale.Error as err:
             self.skipTest("Cannot set locale: {}".format(err))
         try: