(self)
| 410 | assert "".join(fit_bounds_rendered.split()) in "".join(out.split()) |
| 411 | |
| 412 | def test_fit_bounds_2(self): |
| 413 | bounds = ((52.193636, -2.221575), (52.636878, -1.139759)) |
| 414 | self.m.fit_bounds(bounds, max_zoom=15, padding=(3, 3)) |
| 415 | fitbounds = [ |
| 416 | val |
| 417 | for key, val in self.m._children.items() |
| 418 | if isinstance(val, folium.FitBounds) |
| 419 | ][0] |
| 420 | out = self.m._parent.render() |
| 421 | |
| 422 | fit_bounds_rendered = self.fit_bounds_template.render( |
| 423 | { |
| 424 | "bounds": json.dumps(bounds), |
| 425 | "fit_bounds_options": json.dumps( |
| 426 | { |
| 427 | "maxZoom": 15, |
| 428 | "padding": (3, 3), |
| 429 | }, |
| 430 | sort_keys=True, |
| 431 | ), |
| 432 | "this": fitbounds, |
| 433 | } |
| 434 | ) |
| 435 | |
| 436 | assert "".join(fit_bounds_rendered.split()) in "".join(out.split()) |
| 437 | |
| 438 | bounds = self.m.get_bounds() |
| 439 | assert bounds == [[None, None], [None, None]], bounds |
| 440 | |
| 441 | def test_custom_icon(self): |
| 442 | """Test CustomIcon.""" |
nothing calls this directly
no test coverage detected