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

Function test_render

tests/test_text.py:681–689  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

679
680
681def test_render():
682 console = Console(width=15, record=True)
683 text = Text.from_markup(
684 "[u][b]Where[/b] there is a [i]Will[/i], there is a Way.[/u]"
685 )
686 console.print(text)
687 output = console.export_text(styles=True)
688 expected = "\x1b[1;4mWhere\x1b[0m\x1b[4m there is \x1b[0m\n\x1b[4ma \x1b[0m\x1b[3;4mWill\x1b[0m\x1b[4m, there \x1b[0m\n\x1b[4mis a Way.\x1b[0m\n"
689 assert output == expected
690
691
692def test_render_simple():

Callers

nothing calls this directly

Calls 4

printMethod · 0.95
export_textMethod · 0.95
ConsoleClass · 0.90
from_markupMethod · 0.80

Tested by

no test coverage detected