Skip to content

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

2 participants