MCPcopy
hub / github.com/scrapy/scrapy / test_start_subclass

Method test_start_subclass

tests/test_spider_start.py:65–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63
64 @coroutine_test
65 async def test_start_subclass(self):
66 class BaseSpider(Spider):
67 async def start(self):
68 yield ITEM_A
69
70 class TestSpider(BaseSpider):
71 name = "test"
72
73 with warnings.catch_warnings():
74 warnings.simplefilter("error")
75 await self._test_spider(TestSpider, [ITEM_A])
76
77 async def _test_start(self, start_, expected_items=None):
78 class TestSpider(Spider):

Callers

nothing calls this directly

Calls 1

_test_spiderMethod · 0.95

Tested by

no test coverage detected