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

Function test_table_show_header_false_substitution

tests/test_table.py:195–209  ·  view source on GitHub ↗

When the box style is one with a custom header edge, it should be substituted for the equivalent box that does not have a custom header when show_header=False

(box, result)

Source from the content-addressed store, hash-verified

193 ],
194)
195def test_table_show_header_false_substitution(box, result):
196 """When the box style is one with a custom header edge, it should be substituted for
197 the equivalent box that does not have a custom header when show_header=False"""
198 table = Table(show_header=False, box=box)
199 table.add_column()
200 table.add_column()
201
202 table.add_row("1", "2")
203 table.add_row("3", "4")
204
205 console = Console(record=True)
206 console.print(table)
207 output = console.export_text()
208
209 assert output == result
210
211
212def test_section():

Callers

nothing calls this directly

Calls 6

add_columnMethod · 0.95
add_rowMethod · 0.95
printMethod · 0.95
export_textMethod · 0.95
TableClass · 0.90
ConsoleClass · 0.90

Tested by

no test coverage detected