python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 433 forks source link

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

Closed mgorny closed 1 year ago

mgorny commented 1 year ago

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

mgorny commented 1 year ago

Ping.

mgorny commented 1 year ago

Thanks!

akx commented 1 year ago

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

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