Mocking time
#1091
Replies: 1 comment
-
|
Can you show me your MockScheduler so I can get a better idea of how you're mocking the clock? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I really enjoy the APScheduler, I integrated it into my company codebase but have some problems when I want to run tests with it.
Most of our tests run faster then the time progress when try are running offline.
I would like to be able to set the time the scheduler watch, and progress it by my objects.
There is easy way to do so?
Currently I wrote a MockScheduler that use part of the APSchduler API, it gets a time object, the time object is set by one of our company components, then at each set, the MockScheduler check for triggers to fire (using the next fire time method).
If found, a trigger will be fired by calling directly to its target.
There is better implementation using more of the APSchduler implementation?
Beta Was this translation helpful? Give feedback.
All reactions