()
| 199 | |
| 200 | |
| 201 | def test_render_meta(): |
| 202 | console = Console() |
| 203 | text = render("foo[@click=close]bar[/]baz") |
| 204 | assert text.get_style_at_offset(console, 3).meta == {"@click": ("close", ())} |
| 205 | |
| 206 | text = render("foo[@click=close()]bar[/]baz") |
| 207 | assert text.get_style_at_offset(console, 3).meta == {"@click": ("close", ())} |
| 208 | |
| 209 | text = render("foo[@click=close('dialog')]bar[/]baz") |
| 210 | assert text.get_style_at_offset(console, 3).meta == { |
| 211 | "@click": ("close", ("dialog",)) |
| 212 | } |
| 213 | text = render("foo[@click=close('dialog', 3)]bar[/]baz") |
| 214 | assert text.get_style_at_offset(console, 3).meta == { |
| 215 | "@click": ("close", ("dialog", 3)) |
| 216 | } |
| 217 | |
| 218 | text = render("foo[@click=(1, 2, 3)]bar[/]baz") |
| 219 | assert text.get_style_at_offset(console, 3).meta == {"@click": (1, 2, 3)} |
nothing calls this directly
no test coverage detected