-
Notifications
You must be signed in to change notification settings - Fork 473
use different timezones to run CI tests #1259
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
base: master
Are you sure you want to change the base?
use different timezones to run CI tests #1259
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1259 +/- ##
=======================================
Coverage 98.14% 98.14%
=======================================
Files 234 234
Lines 2748 2748
=======================================
Hits 2697 2697
Misses 51 51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a10e9fd
to
13b563b
Compare
13b563b
to
c2fc6ef
Compare
c2fc6ef
to
57e09d6
Compare
The search_dates default behavior is to use UTC timezone when no overridden setting is provided, hence the test must define the expectations in UTC timezone.
25af3fb
to
30c4bd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Maybe a single TZ job would be enough, but 🤷
@Gallaecio yeah. The only difference between the two is that one observes DST while the other doesn't. So I kept both of them. |
The test fails when it runs at midnight or, in general, when a time difference causes changes in dates for UTC and non-UTC time zones.
Some tests expect the local timezone to be picked resulting in a different expectation than the actual result. The result of the
search_dates
method picks UTC when nothing is provided in the absence of date & time.Additionally, I reckon the issue was introduced in #1111, where
datetime.datetime.utcnow().month
was replaced withdatetime.datetime.today().month
.