GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149879: Fix test_strptime on Cygwin by vstinner · Pull Request #150438 · python/cpython

gh-149879: Fix test_strptime on Cygwin #150438

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.

Sign up for GitHub

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

Merged
vstinner merged 1 commit into python:main from vstinner:test_strptime
May 26, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

gh-149879: Fix test_strptime on Cygwin #150438

Changes from all commits
Commits
Show all changes
1 commit
Select commit
1dc0bd0
gh-149879: Fix test_strptime on Cygwin
vstinner May 26, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
gh-149879: Fix test_strptime on Cygwin
Skip my_MM and or_IN locales on multiple tests, since the tests fail
on Cygwin.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner committed May 26, 2026
commit 1dc0bd0ef78088468d016fc1c7edb8d4e2c67fc2

There are no files selected for viewing

17 changes: 17 additions & 0 deletions 17 Lib/test/test_strptime.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
else:
glibc_ver = None

def skip_cygwin_locale():
if sys.platform != 'cygwin':
return
loc = locale.getlocale(locale.LC_TIME)[0]
if loc in ('my_MM', 'or_IN'):
raise unittest.SkipTest('test fails on Cygwin')


class getlang_Tests(unittest.TestCase):
"""Test _getlang"""
Expand Down Expand Up @@ -509,6 +516,8 @@ def test_bad_timezone(self):
'my_MM', 'or_IN', 'shn_MM', 'az_IR',
'byn_ER', 'wal_ET', 'lzh_TW')
def test_date_time_locale(self):
skip_cygwin_locale()

# Test %c directive
loc = locale.getlocale(locale.LC_TIME)[0]
if glibc_ver and glibc_ver < (2, 31) and loc == 'br_FR':
Expand Down Expand Up @@ -536,6 +545,8 @@ def test_date_time_locale(self):
'csb_PL', 'br_FR', 'gez_ET', 'brx_IN',
'my_MM', 'shn_MM')
def test_date_time_locale2(self):
skip_cygwin_locale()

# Test %c directive
loc = locale.getlocale(locale.LC_TIME)[0]
if sys.platform.startswith('sunos'):
Expand All @@ -550,6 +561,8 @@ def test_date_time_locale2(self):
'he_IL', 'eu_ES', 'ar_AE',
'az_IR', 'my_MM', 'or_IN', 'shn_MM', 'lzh_TW')
def test_date_locale(self):
skip_cygwin_locale()

# Test %x directive
now = time.time()
self.roundtrip('%x', slice(0, 3), time.localtime(now))
Expand All @@ -567,6 +580,8 @@ def test_date_locale(self):
@run_with_locales('LC_TIME', 'en_US', 'fr_FR', 'de_DE', 'ja_JP',
'eu_ES', 'ar_AE', 'my_MM', 'shn_MM', 'lzh_TW')
def test_date_locale2(self):
skip_cygwin_locale()

# Test %x directive
loc = locale.getlocale(locale.LC_TIME)[0]
if sys.platform.startswith(('sunos', 'aix')):
Expand All @@ -587,6 +602,8 @@ def test_date_locale2(self):
'ti_ET', 'tig_ER', 'wal_ET', 'lzh_TW',
'ar_SA', 'bg_BG')
def test_time_locale(self):
skip_cygwin_locale()

# Test %X directive
loc = locale.getlocale(locale.LC_TIME)[0]
pos = slice(3, 6)
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.