MCPcopy
hub / github.com/python-visualization/folium / setup_method

Method setup_method

tests/test_folium.py:59–86  ·  view source on GitHub ↗

Setup Folium Map.

(self)

Source from the content-addressed store, hash-verified

57 """Test class for the Folium library."""
58
59 def setup_method(self):
60 """Setup Folium Map."""
61 attr = "http://openstreetmap.org"
62 self.m = folium.Map(
63 location=[45.5236, -122.6750],
64 width=900,
65 height=400,
66 max_zoom=20,
67 zoom_start=4,
68 max_bounds=True,
69 font_size="1.5rem",
70 attr=attr,
71 )
72 self.fit_bounds_template = Template(
73 """
74 {% if autobounds %}
75 var autobounds = L.featureGroup({{ features }}).getBounds()
76 {% if not bounds %}
77 {% set bounds = "autobounds" %}
78 {% endif %}
79 {% endif %}
80 {% if bounds %}
81 {{this._parent.get_name()}}.fitBounds({{ bounds }},
82 {{ fit_bounds_options }}
83 );
84 {% endif %}
85 """
86 )
87
88 def test_init(self):
89 """Test map initialization."""

Callers

nothing calls this directly

Calls 1

TemplateClass · 0.90

Tested by

no test coverage detected