MCPcopy
hub / github.com/scrapy/scrapy / test_jmespath_not_available

Function test_jmespath_not_available

tests/test_selector.py:245–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243
244@pytest.mark.skipif(PARSEL_18_PLUS, reason="parsel >= 1.8 supports jmespath")
245def test_jmespath_not_available() -> None:
246 body = """
247 {
248 "website": {"name": "Example"}
249 }
250 """
251 resp = TextResponse(url="http://example.com", body=body, encoding="utf-8")
252 with pytest.raises(AttributeError):
253 resp.jmespath("website.name").get()

Callers

nothing calls this directly

Calls 3

jmespathMethod · 0.95
TextResponseClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected