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

Method test_builtin_tile

tests/test_folium.py:124–136  ·  view source on GitHub ↗

Test custom maptiles.

(self, tiles, provider)

Source from the content-addressed store, hash-verified

122 ],
123 )
124 def test_builtin_tile(self, tiles, provider):
125 """Test custom maptiles."""
126
127 m = folium.Map(location=[45.5236, -122.6750], tiles=tiles)
128 tiles = "".join(tiles.lower().strip().split())
129 url = provider.build_url(fill_subdomain=False, scale_factor="{r}")
130 attr = provider.html_attribution
131
132 assert m._children[tiles.replace("_", "")].tiles == url
133 assert htmlsafe_json_dumps(attr) in m._parent.render()
134
135 bounds = m.get_bounds()
136 assert bounds == [[None, None], [None, None]], bounds
137
138 def test_custom_tile(self):
139 """Test custom tile URLs."""

Callers

nothing calls this directly

Calls 2

get_boundsMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected