mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-03 17:52:31 +01:00
leverage timing a bit more
This commit is contained in:
parent
cd42524fd4
commit
75c6662f35
1 changed files with 3 additions and 3 deletions
|
@ -104,11 +104,11 @@ class JobQueueTest(BaseTest, unittest.TestCase):
|
||||||
|
|
||||||
def test_inUpdater(self):
|
def test_inUpdater(self):
|
||||||
u = Updater(bot="MockBot", job_queue_tick_interval=0.005)
|
u = Updater(bot="MockBot", job_queue_tick_interval=0.005)
|
||||||
u.job_queue.put(self.job1, 0.11)
|
u.job_queue.put(self.job1, 0.5)
|
||||||
sleep(0.2)
|
sleep(0.75)
|
||||||
self.assertEqual(1, self.result)
|
self.assertEqual(1, self.result)
|
||||||
u.stop()
|
u.stop()
|
||||||
sleep(0.4)
|
sleep(2)
|
||||||
self.assertEqual(1, self.result)
|
self.assertEqual(1, self.result)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue