MCPcopy
hub / github.com/scrapy/scrapy / test_exception_callback

Method test_exception_callback

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

Source from the content-addressed store, hash-verified

748
749 @coroutine_test
750 async def test_exception_callback(
751 self, crawler: Crawler, caplog: pytest.LogCaptureFixture
752 ) -> None:
753 engine = ExecutionEngine(crawler, lambda _: defer.fail(ValueError()))
754 crawler.engine = engine
755 await engine.open_spider_async()
756 await engine.close_spider_async()
757 assert "Error running spider_closed_callback" in caplog.text
758
759 @coroutine_test
760 async def test_exception_async_callback(

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