MCPcopy
hub / github.com/Textualize/rich / test_append

Function test_append

tests/test_text.py:349–361  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

347
348
349def test_append():
350 text = Text("foo")
351 text.append("bar")
352 assert str(text) == "foobar"
353 text.append(Text("baz", "bold"))
354 assert str(text) == "foobarbaz"
355 assert text._spans == [Span(6, 9, "bold")]
356
357 with pytest.raises(ValueError):
358 text.append(Text("foo"), "bar")
359
360 with pytest.raises(TypeError):
361 text.append(1)
362
363
364def test_append_text():

Callers

nothing calls this directly

Calls 3

appendMethod · 0.95
TextClass · 0.90
SpanClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…