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

Function test_text_column

tests/test_progress.py:64–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def test_text_column():
65 text_column = TextColumn("[b]foo", highlighter=NullHighlighter())
66 task = Task(1, "test", 100, 20, _get_time=lambda: 1.0)
67 text = text_column.render(task)
68 assert str(text) == "foo"
69
70 text_column = TextColumn("[b]bar", markup=False)
71 task = Task(1, "test", 100, 20, _get_time=lambda: 1.0)
72 text = text_column.render(task)
73 assert text == Text("[b]bar")
74
75
76def test_time_elapsed_column():

Callers

nothing calls this directly

Calls 5

renderMethod · 0.95
TextColumnClass · 0.90
NullHighlighterClass · 0.90
TaskClass · 0.90
TextClass · 0.90

Tested by

no test coverage detected