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

Function test_rule_in_unexpanded_table

tests/test_rule_in_table.py:13–32  ·  view source on GitHub ↗
(expand_kwarg)

Source from the content-addressed store, hash-verified

11
12@pytest.mark.parametrize("expand_kwarg", ({}, {"expand": False}))
13def test_rule_in_unexpanded_table(expand_kwarg):
14 console = Console(width=32, file=io.StringIO(), legacy_windows=False, _environ={})
15 table = Table(box=box.ASCII, show_header=False, **expand_kwarg)
16 table.add_column()
17 table.add_column()
18 table.add_row("COL1", "COL2")
19 table.add_row("COL1", Rule())
20 table.add_row("COL1", "COL2")
21 console.print(table)
22 expected = dedent(
23 """\
24 +-------------+
25 | COL1 | COL2 |
26 | COL1 | ──── |
27 | COL1 | COL2 |
28 +-------------+
29 """
30 )
31 result = console.file.getvalue()
32 assert result == expected
33
34
35def test_rule_in_expanded_table():

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…