-
Notifications
You must be signed in to change notification settings - Fork 37
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
More DST unit tests (WIP) #32
base: master
Are you sure you want to change the base?
Conversation
Add unittests for "DST - croniter gets stuck iterating across DST change" taichino#137 Test include (1) as-reported using dateutil.tz, (2) reverse version (which works fine), (3) pytz version which works in reverse time as well, but fails in a different way moving forward in time. Add little test helper function because remembering to use tz.localize() vs datetime(tzinfo=tz) is silly, IMO.
Add additional DST unit tests. 3 are working, 1 fails.
@kiorky, regarding DST issues in general: I'm wondering if any inspiration can be had from something like https://www.npmjs.com/package/cron-parser. I'm not a big javascript guy myself, but I'm wondering if reviewing some their code could lead to some discoveries. There seems to be a number of similarities between the two libraries, other than programming language, of course, but possibly enough to peak at certain things like DST handling. But in the meantime, I'm hoping that collecting failing DST unit tests will ultimately provide some additional insight or pattern. |
Here's a interesting consolidation of different ways DST can be solved by scedulers. @kiorky, do any of these align with the approach taken by croniter (or otherwise seem desirable)? jmrozanec/cron-utils#213 |
croniter philosophy is based on unix implementation, so the first choice. |
@lowell80 im not finished yet, but i'm revamping the DST code trying to make it cleaner... |
You can see where i am in the associated PR, but it's in plain WIP even commited here with pdb's ;) |
This is a set of possible DST unit tests for inclusion. This includes issues reported in taichino#137. I'll keep this PR in draft mode for the time being. Not all of the unit tests fail, but quite a number of them do. Each test has a comment/docstring indicate if it's working or not at the time of creation.