@@ -52,7 +52,10 @@ def test_from_rich_text():
5252 content = Content .from_rich_text (text )
5353 assert len (content ) == 11
5454 assert content .plain == "Hello World"
55- assert [Span (start = 0 , end = 5 , style = "red" ), Span (start = 6 , end = 11 , style = "blue" )]
55+ assert content .spans == [
56+ Span (start = 0 , end = 5 , style = "red" ),
57+ Span (start = 6 , end = 11 , style = "blue" ),
58+ ]
5659
5760
5861def test_styled ():
@@ -136,6 +139,7 @@ def test_add() -> None:
136139 assert content .spans == [Span (0 , 3 , "red" ), Span (4 , 7 , "blue" )]
137140 assert content .cell_length == 7
138141
142+
139143def test_radd () -> None :
140144 """Test reverse addition."""
141145 assert "foo" + Content ("bar" ) == Content ("foobar" )
@@ -145,6 +149,7 @@ def test_radd() -> None:
145149 assert str (content ) == "foo bar"
146150 assert content .spans == [Span (4 , 7 , "blue" )]
147151
152+
148153def test_from_markup ():
149154 """Test simple parsing of content markup."""
150155 content = Content .from_markup ("[red]Hello[/red] [blue]World[/blue]" )
0 commit comments