MCPcopy
hub / github.com/Textualize/textual / test_join

Function test_join

tests/test_content.py:173–186  ·  view source on GitHub ↗

Test the join method.

()

Source from the content-addressed store, hash-verified

171
172
173def test_join():
174 """Test the join method."""
175
176 # Edge cases
177 assert Content("").join([]) == ""
178 assert Content(".").join([]) == ""
179 assert Content("").join(["foo"]) == "foo"
180 assert Content(".").join(["foo"]) == "foo"
181
182 # Join strings and Content
183 pieces = [Content.styled("foo", "red"), "bar", Content.styled("baz", "blue")]
184 content = Content(".").join(pieces)
185 assert content.plain == "foo.bar.baz"
186 assert content.spans == [Span(0, 3, "red"), Span(8, 11, "blue")]
187
188
189def test_sort():

Callers

nothing calls this directly

Calls 4

ContentClass · 0.90
SpanClass · 0.90
styledMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…