MCPcopy
hub / github.com/scrapy/scrapy / setup_method

Method setup_method

tests/test_logstats.py:12–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10
11class TestLogStats:
12 def setup_method(self):
13 self.crawler = get_crawler(SimpleSpider)
14 self.spider = self.crawler._create_spider("spidey")
15 self.stats = self.crawler.stats
16
17 self.stats.set_value("response_received_count", 4802)
18 self.stats.set_value("item_scraped_count", 3201)
19
20 @coroutine_test
21 async def test_stats_calculations(self):

Callers

nothing calls this directly

Calls 3

get_crawlerFunction · 0.90
_create_spiderMethod · 0.80
set_valueMethod · 0.45

Tested by

no test coverage detected