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

Function test_render

tests/test_requests_html.py:177–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176@pytest.mark.render
177def test_render():
178 r = get()
179 script = """
180 () => {
181 return {
182 width: document.documentElement.clientWidth,
183 height: document.documentElement.clientHeight,
184 deviceScaleFactor: window.devicePixelRatio,
185 }
186 }
187 """
188 val = r.html.render(script=script)
189 for value in ('width', 'height', 'deviceScaleFactor'):
190 assert value in val
191
192 about = r.html.find('#about', first=True)
193 assert len(about.links) == 6
194
195
196@pytest.mark.render

Callers

nothing calls this directly

Calls 3

getFunction · 0.85
renderMethod · 0.80
findMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…