()
| 19 | |
| 20 | |
| 21 | def test_circle(): |
| 22 | m = Map() |
| 23 | radius = 10000 |
| 24 | popup = f"I am {radius} meters" |
| 25 | location = [-27.551667, -48.478889] |
| 26 | |
| 27 | circle = Circle( |
| 28 | location=location, |
| 29 | radius=radius, |
| 30 | color="black", |
| 31 | weight=2, |
| 32 | fill_opacity=0.6, |
| 33 | opacity=1, |
| 34 | fill=True, |
| 35 | popup=popup, |
| 36 | ) |
| 37 | circle.add_to(m) |
| 38 | |
| 39 | expected_options = { |
| 40 | "bubblingMouseEvents": True, |
| 41 | "color": "black", |
| 42 | "dashArray": None, |
| 43 | "dashOffset": None, |
| 44 | "fill": True, |
| 45 | "fillColor": "black", |
| 46 | "fillOpacity": 0.6, |
| 47 | "fillRule": "evenodd", |
| 48 | "lineCap": "round", |
| 49 | "lineJoin": "round", |
| 50 | "opacity": 1, |
| 51 | "radius": radius, |
| 52 | "stroke": True, |
| 53 | "weight": 2, |
| 54 | } |
| 55 | |
| 56 | m._repr_html_() |
| 57 | expected_rendered = f""" |
| 58 | var {circle.get_name()} = L.circle( |
| 59 | {location}, |
| 60 | {{ |
| 61 | "bubblingMouseEvents": true, |
| 62 | "color": "black", |
| 63 | "dashArray": null, |
| 64 | "dashOffset": null, |
| 65 | "fill": true, |
| 66 | "fillColor": "black", |
| 67 | "fillOpacity": 0.6, |
| 68 | "fillRule": "evenodd", |
| 69 | "lineCap": "round", |
| 70 | "lineJoin": "round", |
| 71 | "opacity": 1, |
| 72 | "radius": {radius}, |
| 73 | "stroke": true, |
| 74 | "weight": 2 |
| 75 | }} |
| 76 | ) |
| 77 | .addTo({m.get_name()}); |
| 78 | """ # noqa |
nothing calls this directly
no test coverage detected