mirror of https://github.com/scrapy/scrapy.git
Fix FileFeedStoragePreFeedOptionsTest fails in CI/CD pipeline (#5198)
This commit is contained in:
parent
4d1ecc31c9
commit
94baa4b272
|
|
@ -1932,14 +1932,15 @@ class FileFeedStoragePreFeedOptionsTest(unittest.TestCase):
|
|||
maxDiff = None
|
||||
|
||||
def test_init(self):
|
||||
settings_dict = {
|
||||
'FEED_URI': 'file:///tmp/foobar',
|
||||
'FEED_STORAGES': {
|
||||
'file': FileFeedStorageWithoutFeedOptions
|
||||
},
|
||||
}
|
||||
crawler = get_crawler(settings_dict=settings_dict)
|
||||
feed_exporter = FeedExporter.from_crawler(crawler)
|
||||
with tempfile.NamedTemporaryFile() as temp:
|
||||
settings_dict = {
|
||||
'FEED_URI': f'file:///{temp.name}',
|
||||
'FEED_STORAGES': {
|
||||
'file': FileFeedStorageWithoutFeedOptions
|
||||
},
|
||||
}
|
||||
crawler = get_crawler(settings_dict=settings_dict)
|
||||
feed_exporter = FeedExporter.from_crawler(crawler)
|
||||
spider = scrapy.Spider("default")
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
feed_exporter.open_spider(spider)
|
||||
|
|
|
|||
Loading…
Reference in New Issue