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

Function test_syntax_padding

tests/test_syntax.py:374–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372
373
374def test_syntax_padding() -> None:
375 syntax = Syntax("x = 1", lexer="python", padding=(1, 3))
376 console = Console(
377 width=20,
378 file=io.StringIO(),
379 color_system="truecolor",
380 legacy_windows=False,
381 record=True,
382 )
383 console.print(syntax)
384 output = console.export_text()
385 assert (
386 output == " \n x = 1 \n \n"
387 )
388
389
390def test_syntax_measure() -> None:

Callers

nothing calls this directly

Calls 4

printMethod · 0.95
export_textMethod · 0.95
SyntaxClass · 0.90
ConsoleClass · 0.90

Tested by

no test coverage detected