Test map initialization.
(self)
| 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", |
nothing calls this directly
no outgoing calls
no test coverage detected