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

Use UTC explicitly in timetable tests #36082

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Dec 6, 2023

See discussion #35887 (review)

These tests logically depend on the fact that the test suite is run in UTC. While that is true and expected to remain this way for the foreseeable future, it is better to make them use UTC explicitly.

Note that timetables are expected to return times in UTC anyway.

@uranusjr uranusjr requested a review from dstandish December 6, 2023 08:17
These tests logically depend on the fact that the test suite is run in
UTC. While that is true and expected to remain this way for the
foreseeable future, it is better to make them use UTC explicitly.

Note that timetables are expected to return times in UTC anyway.
Pendulum does not implement caching in the constructor, but with a
wrapper function. This causes issues in tests due to classes such as
Timezone does not implement equality, making asserts difficult.

By using the wrapper functions instead, we can help Pendulum produces
equal values more consistently.
@uranusjr uranusjr force-pushed the use-utc-in-timetable-tests branch from 591f2cd to 8944682 Compare December 7, 2023 09:37
@uranusjr uranusjr merged commit c1d28b3 into apache:main Dec 7, 2023
53 checks passed
@uranusjr uranusjr deleted the use-utc-in-timetable-tests branch December 7, 2023 18:36
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.1 milestone Jan 10, 2024
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 10, 2024
ephraimbuddy pushed a commit that referenced this pull request Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants