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

Function test_terminator

tests/plugins/test_terminator.py:12–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11
12def test_terminator():
13 m = folium.Map([45.0, 3.0], zoom_start=1)
14 t = plugins.Terminator().add_to(m)
15
16 out = normalize(m._parent.render())
17
18 # Verify that the script is okay.
19 tmpl = Template("L.terminator().addTo({{this._parent.get_name()}});")
20 expected = normalize(tmpl.render(this=t))
21 assert expected in out
22
23 bounds = m.get_bounds()
24 assert bounds == [[None, None], [None, None]], bounds

Callers

nothing calls this directly

Calls 5

normalizeFunction · 0.90
TemplateClass · 0.90
add_toMethod · 0.80
get_boundsMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected