Scrapy, a fast high-level web crawling & scraping framework for Python.
Fix test issues
Andrey Rahmatullinbbe24d79a5ee
diff --git a/tests/test_pipeline_images.py b/tests/test_pipeline_images.pyindex 0c9a5733f..f98d40fda 100644--- a/tests/test_pipeline_images.py+++ b/tests/test_pipeline_images.py@@ -5,7 +5,6 @@ import randomimport warningsfrom shutil import rmtreefrom tempfile import mkdtemp-from unittest import skipIffrom unittest.mock import patchimport attr@@ -535,16 +534,16 @@ class NoimagesDropTestCase(unittest.TestCase):def test_deprecation_warning(self):arg = str()- with warnings.catch_warnings(record=True) as warnings:+ with warnings.catch_warnings(record=True) as w:NoimagesDrop(arg)- self.assertEqual(len(warnings), 1)- self.assertEqual(warnings[0].category, ScrapyDeprecationWarning)- with warnings.catch_warnings(record=True) as warnings:+ self.assertEqual(len(w), 1)+ self.assertEqual(w[0].category, ScrapyDeprecationWarning)+ with warnings.catch_warnings(record=True) as w:class SubclassedNoimagesDrop(NoimagesDrop):passSubclassedNoimagesDrop(arg)- self.assertEqual(len(warnings), 1)- self.assertEqual(warnings[0].category, ScrapyDeprecationWarning)+ self.assertEqual(len(w), 1)+ self.assertEqual(w[0].category, ScrapyDeprecationWarning)def _create_image(format, *a, **kw):