MCPcopy Create free account
hub / github.com/python-visualization/folium / test_valid_html

Function test_valid_html

tests/test_repr.py:30–43  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

28
29
30def test_valid_html(m):
31 html = m._repr_html_()
32 parts = html.split("><")
33 assert len(parts) == 7
34 assert parts[0].lstrip("<div ") == 'style="width:100%;"'
35 assert (
36 parts[1].lstrip("<div ")
37 == 'style="position:relative;width:100%;height:0;padding-bottom:60%;"'
38 ) # noqa
39 assert "make this notebook trusted" in parts[2].lower()
40 assert parts[3].startswith("iframe")
41 assert parts[4] == "/iframe"
42 assert parts[5] == "/div"
43 assert parts[6] == "/div>"
44
45
46def test__repr_png_no_image(m):

Callers

nothing calls this directly

Calls 1

_repr_html_Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…