Skip to content
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

Freeze format_time() tests to a specific date to fix test failures #998

Merged
merged 1 commit into from May 9, 2023

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Apr 7, 2023

Freeze the date when performing the tests for format_time() with a timezone specified. Since the time object does not specify a date, the formatter uses the format string specific to the current date. As a result, if the current DST state is different than when the test was last updated, it failed.

This fix covers only regular tests. I have no idea how to do the same for doctests.

Issue #988

Freeze the date when performing the tests for format_time() with
a timezone specified.  Since the time object does not specify a date,
the formatter uses the format string specific to the current date.
As a result, if the current DST state is different than when the test
was last updated, it failed.

This fix covers only regular tests.  I have no idea how to do the same
for doctests.

Issue python-babel#988
@mgorny
Copy link
Contributor Author

mgorny commented Apr 22, 2023

Ping.

Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sorry for the delay.

@akx akx merged commit 8b152db into python-babel:master May 9, 2023
@mgorny
Copy link
Contributor Author

mgorny commented May 9, 2023

Thanks!

@mgorny mgorny deleted the test-tz branch May 9, 2023 15:19
akx added a commit that referenced this pull request Jun 27, 2023
@akx
Copy link
Member

akx commented Jun 27, 2023

I have no idea how to do the same for doctests.

TBH I ended up just # doctest: +SKIPing them in #1017 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants