tabulate test

This commit is contained in:
Will McGugan 2020-07-16 18:32:50 +01:00
parent 0c810d564c
commit 45333bbca5
1 changed files with 11 additions and 0 deletions

11
tests/test_tabulate.py Normal file
View File

@ -0,0 +1,11 @@
from rich.style import Style
from rich.table import _Cell
from rich.tabulate import tabulate_mapping
def test_tabulate_mapping():
# TODO: tabulate_mapping may not be needed shortly
table = tabulate_mapping({"foo": "1", "bar": "2"})
assert len(table.columns) == 2
assert len(table.columns[0]._cells) == 2
assert len(table.columns[1]._cells) == 2