Scrapy, a fast high-level web crawling & scraping framework for Python.
remove_entities: added test for encoding argument
Pablo Hoffmand142489b8113
diff --git a/scrapy/tests/test_utils_markup.py b/scrapy/tests/test_utils_markup.pyindex 5c2c7df32..f51350d90 100644--- a/scrapy/tests/test_utils_markup.py+++ b/scrapy/tests/test_utils_markup.py@@ -33,6 +33,10 @@ class UtilsMarkupTest(unittest.TestCase):# check browser hack for numeric character references in the 80-9F rangeself.assertEqual(remove_entities('x™y', encoding='cp1252'), u'x\u2122y')+ # encoding+ self.assertEqual(remove_entities('x\x99™™y', encoding='cp1252'), \+ u'x\u2122\u2122\u2122y')+def test_replace_tags(self):# make sure it always return uncodeassert isinstance(replace_tags('no entities'), unicode)