Skip to content

gh-53203: Improve tests for strptime() - #125090

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:run_with_locales
Oct 8, 2024
Merged

gh-53203: Improve tests for strptime()#125090
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:run_with_locales

Conversation

@serhiy-storchaka

@serhiy-storchakaserhiy-storchaka commented Oct 8, 2024

Copy link
Copy Markdown
Member

Run them with different locales and different date and time.

Add the @run_with_locales() decorator to run the test with multiple locales.

Improve the run_with_locale() context manager/decorator -- it now catches only expected exceptions and reports the test as skipped if no appropriate locale is available.

Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
@serhiy-storchaka

Copy link
Copy Markdown
MemberAuthor

This is mainly an extraction from #124946, because the new decorator can be useful in other tests.

@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) October 8, 2024 08:15
@serhiy-storchaka
serhiy-storchaka merged commit 19984fe into python:mainOct 8, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2024
Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 19984fe024bfd90649f1c36b78c9abf3ed72b27d 3.12

@bedevere-app

Copy link
Copy Markdown

GH-125091 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Oct 8, 2024
serhiy-storchaka added a commit that referenced this pull request Oct 8, 2024
Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka deleted the run_with_locales branch October 8, 2024 09:12
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Oct 8, 2024
Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

Copy link
Copy Markdown

GH-125093 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Oct 8, 2024
serhiy-storchaka added a commit that referenced this pull request Oct 8, 2024
Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe)
efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this pull request Oct 9, 2024
Run them with different locales and different date and time.
Add the @run_with_locales() decorator to run the test with multiple
locales.
Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
@serhiy-storchakaserhiy-storchaka removed their assignment Jul 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@serhiy-storchaka