diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2022-12-23 20:17:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 20:17:24 (GMT) |
commit | 745545b5bb847023f90505bf9caa983463413780 (patch) | |
tree | 1b6db7fc6c92542ac9bc56769524ee26ce9eb10e /Lib/test/test_strftime.py | |
parent | c5726b727e26b81a267933654cf26b760a90d9aa (diff) | |
download | cpython-745545b5bb847023f90505bf9caa983463413780.zip cpython-745545b5bb847023f90505bf9caa983463413780.tar.gz cpython-745545b5bb847023f90505bf9caa983463413780.tar.bz2 |
gh-99482: remove `jython` compatibility parts from stdlib and tests (#99484)
Diffstat (limited to 'Lib/test/test_strftime.py')
-rw-r--r-- | Lib/test/test_strftime.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py index be43c49..cebfc89 100644 --- a/Lib/test/test_strftime.py +++ b/Lib/test/test_strftime.py @@ -54,14 +54,10 @@ class StrftimeTest(unittest.TestCase): self.now = now def setUp(self): - try: - import java - java.util.Locale.setDefault(java.util.Locale.US) - except ImportError: - from locale import setlocale, LC_TIME - saved_locale = setlocale(LC_TIME) - setlocale(LC_TIME, 'C') - self.addCleanup(setlocale, LC_TIME, saved_locale) + 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() |