| 217 | |
| 218 | @pytest.mark.render |
| 219 | def 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 |