MCPcopy
hub / github.com/psf/requests-html / test_bare_render

Function test_bare_render

tests/test_requests_html.py:219–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218@pytest.mark.render
219def test_bare_render():
220 doc = """<a href='https://httpbin.org'>"""
221 html = HTML(html=doc)
222 script = """
223 () => {
224 return {
225 width: document.documentElement.clientWidth,
226 height: document.documentElement.clientHeight,
227 deviceScaleFactor: window.devicePixelRatio,
228 }
229 }
230 """
231 val = html.render(script=script, reload=False)
232 for value in ('width', 'height', 'deviceScaleFactor'):
233 assert value in val
234
235 assert html.find('html')
236 assert 'https://httpbin.org' in html.links
237
238
239@pytest.mark.render

Callers

nothing calls this directly

Calls 3

renderMethod · 0.95
HTMLClass · 0.90
findMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…