(self)
| 31 | name = "test" |
| 32 | |
| 33 | async def start(self): |
| 34 | yield Request("data:,a") |
| 35 | |
| 36 | await async_sleep(seconds) |
| 37 | |
| 38 | self.crawler.engine._slot.scheduler.pause() |
| 39 | self.crawler.engine._slot.scheduler.enqueue_request(Request("data:,b")) |
| 40 | |
| 41 | # During this time, the scheduler reports having requests but |
| 42 | # returns None. |
| 43 | await async_sleep(seconds) |
| 44 | |
| 45 | self.crawler.engine._slot.scheduler.unpause() |
| 46 | |
| 47 | # The scheduler request is processed. |
| 48 | await async_sleep(seconds) |
| 49 | |
| 50 | yield Request("data:,c") |
| 51 | |
| 52 | await async_sleep(seconds) |
| 53 | |
| 54 | self.crawler.engine._slot.scheduler.pause() |
| 55 | self.crawler.engine._slot.scheduler.enqueue_request(Request("data:,d")) |
| 56 | |
| 57 | # The last start request is processed during the time until the |
| 58 | # delayed call below, proving that the start iteration can |
| 59 | # finish before a scheduler “sleep” without causing the |
| 60 | # scheduler to finish. |
| 61 | call_later(seconds, self.crawler.engine._slot.scheduler.unpause) |
| 62 | |
| 63 | def parse(self, response): |
| 64 | pass |
nothing calls this directly
no test coverage detected