Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Textualize/rich
/ test_fit
Function
test_fit
tests/test_text.py:666–670 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
664
665
666
def
test_fit():
667
text = Text(
"Hello\nWorld"
)
668
lines = text.fit(3)
669
assert str(lines[0]) ==
"Hel"
670
assert str(lines[1]) ==
"Wor"
671
672
673
def
test_wrap_tabs():
Callers
nothing calls this directly
Calls
2
fit
Method · 0.95
Text
Class · 0.90
Tested by
no test coverage detected