mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add tests for str() + Content() fix
This commit is contained in:
@@ -136,6 +136,14 @@ def test_add() -> None:
|
||||
assert content.spans == [Span(0, 3, "red"), Span(4, 7, "blue")]
|
||||
assert content.cell_length == 7
|
||||
|
||||
def test_radd() -> NOne
|
||||
"""Test reverse addition."""
|
||||
assert "foo" + Content("bar") == Content("foobar")
|
||||
|
||||
# Test spans after addition
|
||||
content = "foo " + Content.styled("bar", "blue")
|
||||
assert str(content) == "foo bar"
|
||||
assert content.spans == [Span(4, 7, "blue")]
|
||||
|
||||
def test_from_markup():
|
||||
"""Test simple parsing of content markup."""
|
||||
|
||||
Reference in New Issue
Block a user