File: utils_table.py

package info (click to toggle)
bundlewrap 4.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,216 kB
  • sloc: python: 20,299; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from bundlewrap.utils.table import ROW_SEPARATOR, render_table


def test_render_table():
    assert "\n".join(render_table([
        ["head1", "h2"],
        ROW_SEPARATOR,
        ["1", "2"]
    ], alignments={0: 'right'})) == """
╭───────┬────╮
│ head1 │ h2 │
├───────┼────┤
│     1 │ 2  │
╰───────┴────╯
    """.strip()