MCPcopy
hub / github.com/Textualize/textual / test_outline

Function test_outline

tests/test_styles_cache.py:132–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131
132def test_outline():
133 content = [
134 Strip([Segment("foo")]),
135 Strip([Segment("bar")]),
136 Strip([Segment("baz")]),
137 ]
138 styles = Styles()
139 styles.outline = ("heavy", "white")
140 cache = StylesCache()
141 lines = cache.render(
142 styles,
143 Size(3, 3),
144 Color.parse("blue"),
145 Color.parse("green"),
146 content.__getitem__,
147 [],
148 None,
149 None,
150 content_size=Size(3, 3),
151 )
152
153 text_content = _extract_content(lines)
154 expected_text = [
155 "┏━┓",
156 "┃a┃",
157 "┗━┛",
158 ]
159 assert text_content == expected_text
160
161
162def test_crop():

Callers

nothing calls this directly

Calls 7

renderMethod · 0.95
StripClass · 0.90
StylesClass · 0.90
StylesCacheClass · 0.90
SizeClass · 0.90
_extract_contentFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…