MCPcopy
hub / github.com/scrapy/scrapy / test_exception_scraper

Method test_exception_scraper

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

Source from the content-addressed store, hash-verified

695
696 @coroutine_test
697 async def test_exception_scraper(
698 self, crawler: Crawler, caplog: pytest.LogCaptureFixture
699 ) -> None:
700 engine = ExecutionEngine(crawler, lambda _: None)
701 crawler.engine = engine
702 await engine.open_spider_async()
703 engine.scraper.slot = None
704 await engine.close_spider_async()
705 assert "Scraper close failure" in caplog.text
706
707 @coroutine_test
708 async def test_exception_scheduler(

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