Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6746d9

Browse files
[3.12]gh-53203: Fix test_strptime on Solaris (GH-125785) (GH-125807)
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.(cherry picked from commit9dde463)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent0009651 commite6746d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎Lib/test/test_strptime.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,17 @@ def test_date_time_locale(self):
513513

514514
# NB: Dates before 1969 do not roundtrip on some locales:
515515
# az_IR, bo_CN, bo_IN, dz_BT, eu_ES, eu_FR, fa_IR, or_IN.
516+
@support.run_with_tz('STD-1DST,M4.1.0,M10.1.0')
516517
@run_with_locales('LC_TIME','C','en_US','fr_FR','de_DE','ja_JP',
517518
'he_IL','ar_AE','mfe_MU','yo_NG',
518519
'csb_PL','br_FR','gez_ET','brx_IN',
519520
'my_MM','shn_MM')
520521
deftest_date_time_locale2(self):
521522
# Test %c directive
523+
loc=locale.getlocale(locale.LC_TIME)[0]
524+
ifsys.platform.startswith('sunos'):
525+
iflocin ('ar_AE',):
526+
self.skipTest(f'locale{loc!r} may not work on this platform')
522527
self.roundtrip('%c',slice(0,6), (1900,1,1,0,0,0,0,1,0))
523528
self.roundtrip('%c',slice(0,6), (1800,1,1,0,0,0,0,1,0))
524529

@@ -551,6 +556,10 @@ def test_date_locale(self):
551556
'eu_ES','ar_AE','my_MM','shn_MM')
552557
deftest_date_locale2(self):
553558
# Test %x directive
559+
loc=locale.getlocale(locale.LC_TIME)[0]
560+
ifsys.platform.startswith('sunos'):
561+
iflocin ('en_US','de_DE','ar_AE'):
562+
self.skipTest(f'locale{loc!r} may not work on this platform')
554563
self.roundtrip('%x',slice(0,3), (1900,1,1,0,0,0,0,1,0))
555564
self.roundtrip('%x',slice(0,3), (1800,1,1,0,0,0,0,1,0))
556565

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp