MCPcopy
hub / github.com/python-visualization/folium / test_minimap

Function test_minimap

tests/plugins/test_minimap.py:11–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def test_minimap():
12 m = folium.Map(location=(30, 20), zoom_start=4)
13
14 minimap = plugins.MiniMap()
15 m.add_child(minimap)
16
17 out = normalize(m._parent.render())
18
19 # Verify that a new minimap is getting created.
20 assert "new L.Control.MiniMap" in out
21
22 m = folium.Map(tiles=None, location=(30, 20), zoom_start=4)
23 minimap = plugins.MiniMap()
24 minimap.add_to(m)
25
26 out = normalize(m._parent.render())
27 # verify that tiles are being used
28 assert r"https://tile.openstreetmap.org" in out

Callers

nothing calls this directly

Calls 4

normalizeFunction · 0.90
add_toMethod · 0.80
add_childMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected