- Notifications
You must be signed in to change notification settings - Fork5.7k
clean pending update based on Timedelta or datetime#1987
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Hi. Thanks for the PR. TBH, I haven't looked in too much detail, yet. Regarding tests: I'm a bit surprised that we don't test clean at all. But If I see correctly, it should be enough to mock A few other things I noticed:
If you have more questions, please don't hesitate and ask :) |
Ok, I'll look into it. Is the use of |
Mh … I guess it would be cleaner to either add an explicit argument |
…erify timezone is set, fix it if not. Throw ValueError is timedelta < 1 sec or datetime not < '1 sec' from now.Still has a lot of debugging stuff in there.
Done. Freaking hate handling datetimes....
Done, used functools.partial. Thx btw, learned something new today :) |
Uh oh!
There was an error while loading.Please reload this page.
ikkemaniac commentedJun 10, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
ikkemaniac commentedJun 10, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I keep running into issues w/ pytest to get it running properly (keep ketting |
Poolitzer commentedJun 11, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
No but we have dev requirements did you install them? |
I haven't been able to come up with a all encompassing solution ... i guess you are right, it's too specific and not worth the effort. I'll close this PR. |
Okay. Still, thanks for taking the time and making the effort. It's always appreciated :) |
Uh oh!
There was an error while loading.Please reload this page.
Follow-up of#1978
Add option to pass a
timedelta
ordatetime
as varclean
to.start_polling()
or.start_webhook()
.Updates with a timestamp before
now - timedelta
will be ignored.Updates before
datetime
will be ignored.I'm not familiar with the test-module to write these from scratch as this is not a 'direct' function to test. Can put in some time if y'all can point me to similar examples?
Maybe needs some cleanup but need the gh test bot results for that.