MCPcopy Index your code
hub / github.com/python-visualization/folium / test_feature_group

Method test_feature_group

tests/test_folium.py:161–174  ·  view source on GitHub ↗

Test FeatureGroup.

(self)

Source from the content-addressed store, hash-verified

159 assert attr in m._parent.render()
160
161 def test_feature_group(self):
162 """Test FeatureGroup."""
163
164 m = folium.Map()
165 feature_group = folium.FeatureGroup()
166 feature_group.add_child(folium.Marker([45, -30], popup=folium.Popup("-30")))
167 feature_group.add_child(folium.Marker([45, 30], popup=folium.Popup("30")))
168 m.add_child(feature_group)
169 m.add_child(folium.LayerControl())
170
171 m._repr_html_()
172
173 bounds = m.get_bounds()
174 assert bounds == [[45, -30], [45, 30]], bounds
175
176 def test_topo_json_smooth_factor(self):
177 """Test topojson smooth factor method."""

Callers

nothing calls this directly

Calls 3

_repr_html_Method · 0.95
get_boundsMethod · 0.80
add_childMethod · 0.45

Tested by

no test coverage detected