From 45333bbca5c07cf7d7419f98000d81ff29fe4307 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 16 Jul 2020 18:32:50 +0100 Subject: [PATCH] tabulate test --- tests/test_tabulate.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_tabulate.py diff --git a/tests/test_tabulate.py b/tests/test_tabulate.py new file mode 100644 index 00000000..a0ed94f6 --- /dev/null +++ b/tests/test_tabulate.py @@ -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