Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

include test

Anubhav Patelca882d8d9f09
diff --git a/tests/test_pipeline_images.py b/tests/test_pipeline_images.py
index eb3347442..efa96e146 100644
--- a/tests/test_pipeline_images.py
+++ b/tests/test_pipeline_images.py
@@ -80,9 +80,10 @@ class ImagesPipelineTestCase(unittest.TestCase):
# straigh forward case: RGB and JPEG
COLOUR = (0, 127, 255)
im, buf = _create_image('JPEG', 'RGB', SIZE, COLOUR)
- converted, buf = self.pipeline.convert_image(im, buf)
+ converted, converted_buf = self.pipeline.convert_image(im, buf)
self.assertEqual(converted.mode, 'RGB')
self.assertEqual(converted.getcolors(), [(10000, COLOUR)])
+ self.assertEqual(converted_buf.read(), buf.read())
# check that thumbnail keep image ratio
thumbnail, buf = self.pipeline.convert_image(converted, buf, size=(10, 25))