Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] test_new_api: mitigate babel issue
Since Babel issue 621 [0] searching the week number of a date alongside with the year can lead to a wrong year in the result. e.g.: `2023-01-01` gives `W1 2022` Before the present commit, the tests were surprisingly expecting the wrong result. An attempt was made [1] to fix the upstream issue but was never merged. In the meanwhile, Debian reverted the Babel issue 621 [2] in their package. It means that our test would fail with the patched Debian package like in Ubuntu Noble or Debian Bookworm. On the other hand, if we fix the test to expect the correct value, it would fail on unpatched version of the Babel lib. So, this commit mitigate the issue by guessing the expected value even if the result is wrong. [0]: python-babel/babel#621 [1]: python-babel/babel#887 [2]: https://sources.debian.org/patches/python-babel/2.10.3-1/ X-original-commit: 426fc56
- Loading branch information