Test custom tile URLs.
(self)
| 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" |
nothing calls this directly
no test coverage detected