MCPcopy
hub / github.com/scrapy/scrapy / test_maxdelay_definition

Function test_maxdelay_definition

tests/test_extension_throttle.py:96–103  ·  view source on GitHub ↗
(value, expected)

Source from the content-addressed store, hash-verified

94 ],
95)
96def test_maxdelay_definition(value, expected):
97 settings = {}
98 if value is not UNSET:
99 settings["AUTOTHROTTLE_MAX_DELAY"] = value
100 crawler = get_crawler(settings)
101 at = build_from_crawler(AutoThrottle, crawler)
102 at._spider_opened(DefaultSpider())
103 assert at.maxdelay == expected
104
105
106@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

build_from_crawlerFunction · 0.90
DefaultSpiderClass · 0.90
_spider_openedMethod · 0.80
get_crawlerFunction · 0.70

Tested by

no test coverage detected