Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
✨ Tester for Textualize/textual#4248
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Mar 19, 2024
1 parent af8df4a commit 4ebe9a3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions click_markup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""https://github.com/Textualize/textual/issues/4248"""

from textual.app import App, ComposeResult
from textual.widgets import Label


class ClickMRE(App):
def compose(self) -> ComposeResult:
yield Label(
"[@click]click me and crash[/]"
) # ValueError in run_action on click
yield Label(
"[@click=]click me and crash[/]"
) # ValueError in run_action on click
yield Label(
"[@click=()]click me and crash[/]"
) # ValueError in run_action on click
yield Label("[@click=foobar]click me[/]") # ok, nothing happens
yield Label("[@click=foobar()]click me[/]") # ok, nothing happens
yield Label("[@click=toggle_dark]click me[/]") # ok, works fine
yield Label("[@click=toggle_dark()]click me[/]") # ok, works fine


if __name__ == "__main__":
ClickMRE().run()

### click_markup.py ends here

0 comments on commit 4ebe9a3

Please sign in to comment.