MCPcopy
hub / github.com/scrapy/scrapy / test_init_method_with_selector

Method test_init_method_with_selector

tests/test_loader.py:295–301  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

293 l.get_css("#name::text")
294
295 def test_init_method_with_selector(self):
296 sel = Selector(text="<html><body><div>marta</div></body></html>")
297 l = ProcessorItemLoader(selector=sel)
298 assert l.selector is sel
299
300 l.add_xpath("name", "//div/text()")
301 assert l.get_output_value("name") == ["Marta"]
302
303 def test_init_method_with_selector_css(self):
304 sel = Selector(text="<html><body><div>marta</div></body></html>")

Callers

nothing calls this directly

Calls 2

SelectorClass · 0.90
ProcessorItemLoaderClass · 0.85

Tested by

no test coverage detected