From 57ef3b2689b2b82c65cbe5b479e0615675cf1608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Thu, 13 Mar 2025 10:12:03 +0100 Subject: [PATCH] Update test expectations --- tests/test_crawl.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_crawl.py b/tests/test_crawl.py index a45dfec60..61662a702 100644 --- a/tests/test_crawl.py +++ b/tests/test_crawl.py @@ -194,15 +194,16 @@ class TestCrawl(TestCase): @defer.inlineCallbacks def test_yield_seeds_unsupported_output(self): - """Anything that is not a request or a seeding policy is assumed to be - an item, avoiding a potentially expensive call to itemadapter.is_item, - and letting instead things fail when ItemAdapter is actually used on - the corresponding non-item object.""" + """Anything that is not a request, a seeding policy or a string (which + is assumed to be a seeding policy) is assumed to be an item, avoiding a + potentially expensive call to itemadapter.is_item, and letting instead + things fail when ItemAdapter is actually used on the corresponding + non-item object.""" with LogCapture("scrapy", level=logging.ERROR) as log: crawler = get_crawler(YieldSeedsGoodAndBadOutput) yield crawler.crawl(mockserver=self.mockserver) - assert len(log.records) == 0 + assert len(log.records) == 1 @defer.inlineCallbacks def test_yield_seeds_laziness(self):