From 855041ebfd58a3e0e4190455de305d60bfa104aa Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 14 Sep 2013 12:17:34 +0200 Subject: [PATCH] added test case for comments, see #363 --- scrapy/tests/test_utils_sitemap.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scrapy/tests/test_utils_sitemap.py b/scrapy/tests/test_utils_sitemap.py index 7423d1782..0049e5c40 100644 --- a/scrapy/tests/test_utils_sitemap.py +++ b/scrapy/tests/test_utils_sitemap.py @@ -159,6 +159,20 @@ Disallow: /forum/active/ {'lastmod': '2013-07-15', 'loc': 'http://www.example.com/sitemap3.xml'}, ]) + def test_comment(self): + s = Sitemap(""" + + + http://www.example.com/ + + + """) + + self.assertEqual(list(s), [ + {'loc': 'http://www.example.com/'} + ]) + def test_alternate(self): s = Sitemap("""