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

Function test_geojson_tooltip

tests/test_features.py:154–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152
153# GeoJsonTooltip GeometryCollection
154def test_geojson_tooltip():
155 m = folium.Map([30.5, -97.5], zoom_start=10)
156 folium.GeoJson(
157 os.path.join(rootpath, "kuntarajat.geojson"),
158 tooltip=folium.GeoJsonTooltip(fields=["code", "name"]),
159 ).add_to(m)
160 with warnings.catch_warnings(record=True) as w:
161 warnings.simplefilter("always")
162 m._repr_html_()
163 assert issubclass(
164 w[-1].category, UserWarning
165 ), "GeoJsonTooltip GeometryCollection test failed."
166
167
168# GeoJsonMarker type validation.

Callers

nothing calls this directly

Calls 2

_repr_html_Method · 0.95
add_toMethod · 0.80

Tested by

no test coverage detected