MCPcopy Create free account
hub / github.com/python-visualization/folium / test_init

Method test_init

tests/test_folium.py:88–114  ·  view source on GitHub ↗

Test map initialization.

(self)

Source from the content-addressed store, hash-verified

86 )
87
88 def test_init(self):
89 """Test map initialization."""
90
91 assert self.m.get_name().startswith("map_")
92 assert self.m.get_root() == self.m._parent
93 assert self.m.location == [45.5236, -122.6750]
94 assert self.m.options["zoom"] == 4
95 assert self.m.options["max_bounds"] == [[-90, -180], [90, 180]]
96 assert self.m.position == "relative"
97 assert self.m.height == (400, "px")
98 assert self.m.width == (900, "px")
99 assert self.m.left == (0, "%")
100 assert self.m.top == (0, "%")
101 assert self.m.global_switches.no_touch is False
102 assert self.m.global_switches.disable_3d is False
103 assert self.m.font_size == "1.5rem"
104 assert self.m.to_dict() == {
105 "name": "Map",
106 "id": self.m._id,
107 "children": {
108 "openstreetmap": {
109 "name": "TileLayer",
110 "id": self.m._children["openstreetmap"]._id,
111 "children": {},
112 }
113 },
114 }
115
116 @pytest.mark.parametrize(
117 "tiles,provider",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected