Browse Source
bpo-32139: test_strftime does not anymore modify the locale (GH-4569)
pull/4633/head
xdegaye
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
Lib/test/test_strftime.py
|
|
|
@ -58,8 +58,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() |
|
|
|
|