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

Method test_fit_bounds

tests/test_folium.py:391–410  ·  view source on GitHub ↗

Test fit_bounds.

(self)

Source from the content-addressed store, hash-verified

389 m._parent.render()
390
391 def test_fit_bounds(self):
392 """Test fit_bounds."""
393 bounds = ((52.193636, -2.221575), (52.636878, -1.139759))
394 self.m.fit_bounds(bounds)
395 fitbounds = [
396 val
397 for key, val in self.m._children.items()
398 if isinstance(val, folium.FitBounds)
399 ][0]
400 out = self.m._parent.render()
401
402 fit_bounds_rendered = self.fit_bounds_template.render(
403 {
404 "bounds": json.dumps(bounds),
405 "this": fitbounds,
406 "fit_bounds_options": {},
407 }
408 )
409
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))

Callers

nothing calls this directly

Calls 2

fit_boundsMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected