MCPcopy
hub / github.com/scrapy/scrapy / test_exception_slot

Method test_exception_slot

tests/test_engine.py:674–683  ·  view source on GitHub ↗
(
        self, crawler: Crawler, caplog: pytest.LogCaptureFixture
    )

Source from the content-addressed store, hash-verified

672
673 @coroutine_test
674 async def test_exception_slot(
675 self, crawler: Crawler, caplog: pytest.LogCaptureFixture
676 ) -> None:
677 engine = ExecutionEngine(crawler, lambda _: None)
678 crawler.engine = engine
679 await engine.open_spider_async()
680 assert engine._slot
681 del engine._slot.heartbeat
682 await engine.close_spider_async()
683 assert "Slot close failure" in caplog.text
684
685 @coroutine_test
686 async def test_exception_downloader(

Callers

nothing calls this directly

Calls 3

open_spider_asyncMethod · 0.95
close_spider_asyncMethod · 0.95
ExecutionEngineClass · 0.90

Tested by

no test coverage detected