diff --git a/scrapy/commands/bench.py b/scrapy/commands/bench.py index 714bc38da..16dae6ac4 100644 --- a/scrapy/commands/bench.py +++ b/scrapy/commands/bench.py @@ -67,6 +67,6 @@ class _BenchSpider(scrapy.Spider): return [scrapy.Request(url, dont_filter=True)] def parse(self, response: Response) -> Any: - assert isinstance(Response, TextResponse) + assert isinstance(response, TextResponse) for link in self.link_extractor.extract_links(response): yield scrapy.Request(link.url, callback=self.parse) diff --git a/tests/test_commands.py b/tests/test_commands.py index 50f093043..872b54d04 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1034,6 +1034,7 @@ class BenchCommandTest(CommandTest): ) self.assertIn("INFO: Crawled", log) self.assertNotIn("Unhandled Error", log) + self.assertNotIn("log_count/ERROR", log) class ViewCommandTest(CommandTest):