mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
test fix
This commit is contained in:
parent
56b4c53274
commit
6e97016e22
3 changed files with 19 additions and 1 deletions
|
@ -149,3 +149,17 @@ def test_escape_escape():
|
|||
|
||||
result = render(r"\\\\")
|
||||
assert str(result) == r"\\\\"
|
||||
|
||||
|
||||
def test_events():
|
||||
|
||||
result = render("[@click]Hello[/@click] [@click='view.toggle', 'left']World[/]")
|
||||
assert str(result) == "Hello World"
|
||||
|
||||
|
||||
def test_events_broken():
|
||||
with pytest.raises(MarkupError):
|
||||
render("[@click=sdfwer]foo[/]")
|
||||
|
||||
with pytest.raises(MarkupError):
|
||||
render("[@click='view.toggle]foo[/]")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue