Scrapy, a fast high-level web crawling & scraping framework for Python.
Add a test.
Andrey Rakhmatullinb39d2d4353d9
diff --git a/tests/test_crawler.py b/tests/test_crawler.pyindex 4c5c48e6d..067934961 100644--- a/tests/test_crawler.py+++ b/tests/test_crawler.py@@ -6,6 +6,7 @@ import sysimport warningsfrom pathlib import Path+import pytestfrom packaging.version import parse as parse_versionfrom pytest import mark, raisesfrom twisted.internet import defer@@ -67,6 +68,16 @@ class CrawlerTestCase(BaseCrawlerTest):with raises(ValueError):Crawler(DefaultSpider())+ @defer.inlineCallbacks+ def test_crawler_crawl_twice_deprecated(self):+ crawler = Crawler(NoRequestsSpider)+ yield crawler.crawl()+ with pytest.warns(+ ScrapyDeprecationWarning,+ match=r"Running Crawler.crawl\(\) more than once is deprecated",+ ):+ yield crawler.crawl()+class SpiderSettingsTestCase(unittest.TestCase):def test_spider_custom_settings(self):