mirror of https://github.com/scrapy/scrapy.git
makes suggested changes
This commit is contained in:
parent
881bade2c1
commit
653ac3eebe
|
|
@ -155,7 +155,6 @@ class ImagesPipeline(FilesPipeline):
|
|||
for thumb_id, size in six.iteritems(self.thumbs):
|
||||
thumb_path = self.thumb_path(request, thumb_id, response=response, info=info)
|
||||
if convert_image_overriden:
|
||||
_warn()
|
||||
thumb_image, thumb_buf = self.convert_image(image, size)
|
||||
else:
|
||||
thumb_image, thumb_buf = self.convert_image(image, size, buf)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class ImagesPipelineTestCase(unittest.TestCase):
|
|||
self.assertEqual(converted.getcolors(), [(10000, (205, 230, 255))])
|
||||
|
||||
# ensure that we recieved deprecation warnings
|
||||
self.assertTrue(len(w) >= 4)
|
||||
self.assertTrue(len([warning for warning in w if 'ImagesPipeline.convert_image() method called in a incompatible way' in str(warning.message)]) == 4)
|
||||
|
||||
# tests for new API
|
||||
SIZE = (100, 100)
|
||||
|
|
|
|||
Loading…
Reference in New Issue