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

Function test_get_obj_in_upper_tree

tests/test_utilities.py:180–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178
179
180def test_get_obj_in_upper_tree():
181 m = Map()
182 fg = FeatureGroup().add_to(m)
183 marker = Marker(location=(0, 0)).add_to(fg)
184 assert get_obj_in_upper_tree(marker, FeatureGroup) is fg
185 assert get_obj_in_upper_tree(marker, Map) is m
186 # The search should only go up, not down:
187 with pytest.raises(ValueError):
188 assert get_obj_in_upper_tree(fg, Marker)
189 with pytest.raises(ValueError):
190 assert get_obj_in_upper_tree(marker, Popup)
191
192
193def test_parse_options():

Callers

nothing calls this directly

Calls 5

MapClass · 0.90
FeatureGroupClass · 0.90
MarkerClass · 0.90
get_obj_in_upper_treeFunction · 0.90
add_toMethod · 0.80

Tested by

no test coverage detected