Scrapy, a fast high-level web crawling & scraping framework for Python.
removed commented code and add test for error handling
Daniel Collins425e35ee9023
diff --git a/scrapy/loader/__init__.py b/scrapy/loader/__init__.pyindex 102ffc351..f2c43ab4c 100644--- a/scrapy/loader/__init__.py+++ b/scrapy/loader/__init__.py@@ -115,9 +115,6 @@ class ItemLoader(object):if value is not None:item[field_name] = value- # for loader in self._subloaders:- # loader.load_item()-return itemdef get_output_value(self, field_name):diff --git a/tests/test_loader.py b/tests/test_loader.pyindex 2d34da810..90273c2c8 100644--- a/tests/test_loader.py+++ b/tests/test_loader.py@@ -707,6 +707,11 @@ class SubselectorLoaderTest(unittest.TestCase):self.assertEqual(item['url'], [u'http://www.scrapy.org'])self.assertEqual(item['image'], [u'/images/logo.png'])+ def test_nested_bad_arguments(self):+ l = NestedItemLoader(response=self.response)+ with self.assertRaises(ValueError):+ l.nested_loader(css="#id", xpath="//footer")+class SelectJmesTestCase(unittest.TestCase):test_list_equals = {