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

Function test_vectorgrid

tests/plugins/test_vectorgrid_protobuf.py:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12
13def test_vectorgrid():
14 m = folium.Map(location=(30, 20), zoom_start=4)
15 url = "https://free-{s}.tilehosting.com/data/v3/{z}/{x}/{y}.pbf?token={token}"
16 vc = VectorGridProtobuf(url, "test").add_to(m)
17 out = normalize(m._parent.render())
18
19 expected = normalize(VectorGridProtobuf._template.render(this=vc))
20 assert expected in out
21
22 script = f'<script src="{VectorGridProtobuf.default_js[0][1]}"></script>'
23 assert script in out
24 assert url in out
25 assert "L.vectorGrid.protobuf" in out
26
27
28def test_vectorgrid_str_options():

Callers

nothing calls this directly

Calls 4

VectorGridProtobufClass · 0.90
normalizeFunction · 0.90
add_toMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…