Fix direct use of Crawler instead of get_crawler failing with the default reactor

This commit is contained in:
Adrián Chaves 2025-03-12 08:45:07 +01:00
parent 53841ff419
commit a8a596b287
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ class TestCrawlSpider(TestSpider):
name = "test"
start_url = "https://www.example.com"
crawler = Crawler(TestSpider)
crawler = get_crawler(TestSpider)
with LogCapture("scrapy.core.engine", propagate=False, level=ERROR) as log:
yield crawler.crawl()
log.check(