Kaydet (Commit) bc19cf57 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) xdegaye

bpo-32139: test_strftime does not anymore modify the locale (GH-4569) (#4636)

(cherry picked from commit cc55e78a)
üst fc73c54d
......@@ -60,8 +60,10 @@ class StrftimeTest(unittest.TestCase):
import java
java.util.Locale.setDefault(java.util.Locale.US)
except ImportError:
import locale
locale.setlocale(locale.LC_TIME, 'C')
from locale import setlocale, LC_TIME
saved_locale = setlocale(LC_TIME)
setlocale(LC_TIME, 'C')
self.addCleanup(setlocale, LC_TIME, saved_locale)
def test_strftime(self):
now = time.time()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment