-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-53203: Fix test_strptime on Solaris #125785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -521,8 +521,17 @@ def test_date_time_locale(self): | |
| 'my_MM', 'shn_MM') | ||
| def test_date_time_locale2(self): | ||
| # Test %c directive | ||
| loc = locale.getlocale(locale.LC_TIME)[0] | ||
| if sys.platform.startswith(('sunos', 'solaris')): | ||
| if loc in ('ar_AE',): | ||
| self.skipTest(f'locale {loc!r} may not work on this platform') | ||
| self.roundtrip('%c', slice(0, 6), (1900, 1, 1, 0, 0, 0, 0, 1, 0)) | ||
| self.roundtrip('%c', slice(0, 6), (1800, 1, 1, 0, 0, 0, 0, 1, 0)) | ||
| try: | ||
| self.roundtrip('%c', slice(0, 6), (1800, 1, 1, 0, 0, 0, 0, 1, 0)) | ||
| except ValueError: | ||
| if 'LMT' in time.strftime('%c', (1800, 1, 1, 0, 0, 0, 0, 1, 0)): | ||
| self.skipTest('different timezone in the past is not supported') | ||
|
||
| raise | ||
|
|
||
| # NB: Does not roundtrip because use non-Gregorian calendar: | ||
| # lo_LA, thai, th_TH. On Windows: ar_IN, ar_SA, fa_IR, ps_AF. | ||
|
|
@@ -553,6 +562,10 @@ def test_date_locale(self): | |
| 'eu_ES', 'ar_AE', 'my_MM', 'shn_MM') | ||
| def test_date_locale2(self): | ||
| # Test %x directive | ||
| loc = locale.getlocale(locale.LC_TIME)[0] | ||
| if sys.platform.startswith(('sunos', 'solaris')): | ||
|
||
| if loc in ('en_US', 'de_DE', 'ar_AE'): | ||
| self.skipTest(f'locale {loc!r} may not work on this platform') | ||
| self.roundtrip('%x', slice(0, 3), (1900, 1, 1, 0, 0, 0, 0, 1, 0)) | ||
| self.roundtrip('%x', slice(0, 3), (1800, 1, 1, 0, 0, 0, 0, 1, 0)) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be safely just 'sunos'. AFAIK, neither Oracle nor OpenSolaris forks will report 'solaris' here.