mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
19 lines
531 B
Python
19 lines
531 B
Python
from textual.content import Content
|
|
from textual.widgets import Static
|
|
|
|
|
|
def test_content_property():
|
|
static = Static()
|
|
assert static.content == ""
|
|
static.content = "Foo"
|
|
assert static.content == "Foo"
|
|
assert isinstance(static.content, str)
|
|
assert static.visual == "Foo"
|
|
assert isinstance(static.visual, Content)
|
|
|
|
static.update("Hello")
|
|
assert static.content == "Hello"
|
|
assert isinstance(static.content, str)
|
|
assert static.visual == "Hello"
|
|
assert isinstance(static.visual, Content)
|