MCPcopy
hub / github.com/scrapy/scrapy / test_xmliter_text

Method test_xmliter_text

tests/test_utils_iterators.py:129–138  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 ]
128
129 def test_xmliter_text(self):
130 body = (
131 '<?xml version="1.0" encoding="UTF-8"?>'
132 "<products><product>one</product><product>two</product></products>"
133 )
134
135 assert [x.xpath("text()").getall() for x in self.xmliter(body, "product")] == [
136 ["one"],
137 ["two"],
138 ]
139
140 def test_xmliter_namespaces(self):
141 body = b"""

Callers

nothing calls this directly

Calls 2

xmliterMethod · 0.95
xpathMethod · 0.45

Tested by

no test coverage detected