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

Method test_custom_tile

tests/test_folium.py:138–152  ·  view source on GitHub ↗

Test custom tile URLs.

(self)

Source from the content-addressed store, hash-verified

136 assert bounds == [[None, None], [None, None]], bounds
137
138 def test_custom_tile(self):
139 """Test custom tile URLs."""
140
141 url = "http://{s}.custom_tiles.org/{z}/{x}/{y}.png"
142 attr = "Attribution for custom tiles"
143
144 with pytest.raises(ValueError):
145 folium.Map(location=[45.5236, -122.6750], tiles=url)
146
147 m = folium.Map(location=[45.52, -122.67], tiles=url, attr=attr)
148 assert m._children[url].tiles == url
149 assert attr in m._parent.render()
150
151 bounds = m.get_bounds()
152 assert bounds == [[None, None], [None, None]], bounds
153
154 def test_tilelayer_object(self):
155 url = "http://{s}.custom_tiles.org/{z}/{x}/{y}.png"

Callers

nothing calls this directly

Calls 2

get_boundsMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected