mirror of https://github.com/scrapy/scrapy.git
report warnings
This commit is contained in:
parent
103fdc40c1
commit
73e4ff5304
|
|
@ -182,8 +182,12 @@ class CrawlerRunnerTestCase(BaseCrawlerTest):
|
|||
'SPIDER_MANAGER_CLASS': 'tests.test_crawler.CustomSpiderLoader'
|
||||
})
|
||||
self.assertIsInstance(runner.spider_loader, CustomSpiderLoader)
|
||||
self.assertEqual(len(w), 1)
|
||||
is_one_warning = len(w) == 1
|
||||
if not is_one_warning:
|
||||
for warning in w:
|
||||
print(warning)
|
||||
self.assertIn('Please use SPIDER_LOADER_CLASS', str(w[0].message))
|
||||
self.assertTrue(is_one_warning)
|
||||
|
||||
def test_crawl_rejects_spider_objects(self):
|
||||
with raises(ValueError):
|
||||
|
|
|
|||
Loading…
Reference in New Issue