summaryrefslogtreecommitdiff
path: root/src/croniter/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix merge issueHEADmasterMathieu Le Marec - Pasquet2023-04-121-10/+0
|
* Merge pull request #39 from sg3-141-592/adding-range-begin-end-checkkiorky2023-04-121-0/+10
|\ | | | | Adding check for range begin end
| * Adding check for range begin endsg3-141-5922023-04-121-0/+10
| |
* | LintMathieu Le Marec - Pasquet2023-04-121-1/+1
| |
* | Adding check for range begin endsg3-141-5922023-04-121-0/+10
|/
* Better error handlingMathieu Le Marec - Pasquet2023-04-071-0/+4
| | | | This fixes #34
* Fix DOW hash parsingMathieu Le Marec - Pasquet2023-04-071-0/+62
| | | | This fixes #33
* fix testsMathieu Le Marec - Pasquet2022-09-062-23/+22
|
* Add testShachar Snapiri2022-07-051-0/+14
|
* Again restore compat with py27Mathieu Le Marec - Pasquet2022-02-181-2/+3
|
* Again restore compat with py27Mathieu Le Marec - Pasquet2022-02-181-2/+3
|
* Complete agateblue work to fix #12 & changelogMathieu Le Marec - Pasquet2022-02-181-1/+1
|
* See #12: test case to reproduce issueAgate2022-02-181-1/+8
|
* restore compat with py2Mathieu Le Marec - Pasquet2022-02-151-1/+1
|
* Add a way to make next() easier to use.Mathieu Le Marec - Pasquet2022-02-151-0/+8
| | | | This fixes #11
* Be stricter on day=0Mathieu Le Marec - Pasquet2022-01-141-34/+36
| | | | This relates #9
* Fix typosDaniel Hoherd2022-01-052-2/+2
|
* Be stricter on month=0Mathieu Le Marec - Pasquet2021-12-031-11/+14
| | | | This relates #6
* Better type checksMathieu Le Marec - Pasquet2021-06-251-1/+13
| | | | Fixes #170 #171
* Fix ZeroDivisionError with "* * R/0 * *"Pēteris Caune2021-05-061-1/+6
|
* Review #49Mathieu Le Marec - Pasquet2021-04-131-0/+2
| | | | rel #162
* Add support for hashed/random/keyword expressionsRyan Finnie2021-04-123-2/+211
| | | | Closes: taichino/croniter#162
* add ut to base case 0 6 30 3 *zed20152021-04-071-1/+11
|
* More consolidation of nth/last-wday functionalityLowell Alleman2021-04-071-10/+22
| | | | | | | | | | | | | - Remove _get_last_weekday_of_month and replaced it with _get_nth_weekday_of_month() and avoid making multiple calls to the calendar module when both '#' and 'L' syntax are used at the same time. - Updated unittests for get_last_weekday_of_month() to instead simply call _get_nth_weekday_of_month()[-1]. - Create unit test for new function. Note that _get_nth_weekday_of_month() is a good candidate for caching as repeated calls to calendar add up over time, especially when evaluating multiple cron expressions concurrently.
* Cleanup PR based on feedbackLowell Alleman2021-04-071-0/+12
| | | | | | | | | | - Optimize scenario where only 'L' modifier exists in the wday expression to reduce the number of invocations of the calendar module. - Cleanup and combined parsing logic for specialty wday syntax (d#n/ Ld) - Add new unit tests to confirm proper exception handling for out-of-range 'L' and '#' nth month for the wday expression. - Add examples of new syntax in README. - Update changelog to cover new syntax and new exception.
* Removed some unintentional deltasLowell Alleman2021-04-071-6/+1
|
* New CroniterUnsupportedSyntaxError exceptionLowell Alleman2021-04-071-7/+6
| | | | | | - Added new exception class and detection log for the currently known corner case where croniter is unlikely to return the correct results. - Updated unittests to look for this new exception.
* Collapsed last day support into nth day mechanismLowell Alleman2021-04-071-8/+31
| | | | | | | | | | | | | - Removed much of my new implementation logic, and merged it into the existing nth_weekday_of_momth data structure. The difference between 5th Saturday '6#5' and last Saturday of the month 'L6', in is simply `{'l'}` vs `{5}`. - Updated tests cases based on new capabilities (which were decently expanded, and several limitations and pain points in the code eliminated)! - Marked some test cases with 'expectedFailure' because apparently in the current implementation mixing literal dow values with nth dow isn't properly supported. At least there's no unittests showing that it should work. You get results, but they appear to be wrong to me. So I'm considering this to be a bug, rather than something my new code broke.
* Working L/non-L detection; updated unittestsLowell Alleman2021-04-071-28/+75
| | | | | | - Expanded several few unit tests to show combinations of dow mixing, separately and combined, so that if mixed dow mode becomes supported there are a few tests to start from. See tests `test_lwom_mixup_*()`
* Updated unit testsLowell Alleman2021-04-071-7/+50
| | | | | - Add new unit tests showing how dow L + other should work - Rename some unittests for consistency
* Integrate core logic into _calc()Lowell Alleman2021-04-071-1/+60
|
* RefactoringLowell Alleman2021-04-071-17/+16
|
* Support last day of the month syntaxLowell Alleman2021-04-071-0/+42
| | | | | | | | | | | - Add support for 'L' in the dow field. This is done by internally repurposing the nth_weekday_of_month logic. - Currently mixing 'L' with any other value in the dow field is not supported. NOTE: This is a first proof-of-concept level code. The code seems to work (all tests pass), but the code integration is abysmal. This is the first working snapshot. This code was imported directly from a wrapper class that I wrote and published here: https://github.com/taichino/croniter/issues/159
* Fix (my own) spelling mistakes in unittestsLowell Alleman2021-04-062-4/+4
|
* Split croniter_range() tests into separate fileLowell Alleman2021-04-062-1348/+3
| | | | | | | | | Cleanly divide unit tests to avoid confusion. (A number of croniter unit tests ended up under the CroniterRangeTest class.) Note that all the prior rename and merge commits were done to preserve file history so that 'git blame' and related commands will keep working correctly showing the correct commit/author when changes were made.
* Restore test_croniter.py file nameLowell Alleman2021-04-061-0/+0
|
* Move unitest fileLowell Alleman2021-04-061-0/+1350
|
* Move unitest fileLowell Alleman2021-04-061-0/+0
|
* Rename croniter argument to croniter_range() functionLowell Alleman2021-03-261-2/+2
|
* Enable croniter_range() to use derived classLowell Alleman2021-03-261-0/+25
| | | | | | | - Add new optional 'croniter' argument to croniter_range(), making it useable with an alternate or derived croniter class. - Add unittest demonstrating a simple subclass that accepts 5-part expression (no seconds) which can now be used with croniter_range().
* Remove natsortLowell Alleman2021-03-231-0/+7
| | | | | | - Remove external requirement for 'natsort' and replace it with sorted() using a custom lambda as the 'key'. - Added unit test checking that 'expanded' values are sorted as expected.
* Update _expand to lowercase each component of the expressionPēteris Caune2021-03-061-2/+10
| | | | | This is in relation to #157. With this change, croniter accepts and correctly handles "* * 10-L * *"
* Merge remote-tracking branch 'cuu508/reject_empty_step'Mathieu Le Marec - Pasquet2021-03-021-0/+1
|\
| * Fix _expand to reject expressions with an empty stepPēteris Caune2021-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | Example: 0-10/ * * * * Removed search_re, as it is identical to step_search_re. Tightened step_search_re: the "/{step}" component is optional, but if it *is* present, {step} must consist of one or more digits.
* | Fix _expand to reject int literals with underscoresPēteris Caune2021-03-021-0/+1
|/
* Fix combination of star and invalid expression bugsMathieu Le Marec - Pasquet2021-02-011-0/+8
|
* Security fix: fix overflow when using cron rangesMathieu Le Marec - Pasquet2021-01-291-0/+4
|
* Fix #155: raise CroniterBadCronError when error syntaxMathieu Le Marec - Pasquet2021-01-291-0/+1
|
* spellingMathieu Le Marec - Pasquet2021-01-291-1/+1
|
* Fix match when datetime has microsecondsMathieu Le Marec - Pasquet2021-01-191-0/+5
| | | | fixes #151