summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-01-29 10:54:39 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-01-29 10:54:39 -0500
commit7f76e23221677376bc3676094b6136bb5a259c52 (patch)
tree013d8b95f1e7e63278daed5babc3ff4b2f4243b1 /tests
parent2055dfc9a601d6f2b78e44690aeff475c79369d3 (diff)
downloadcmd2-git-7f76e23221677376bc3676094b6136bb5a259c52.tar.gz
Added more validation to TableCreator
Diffstat (limited to 'tests')
-rw-r--r--tests/test_table_creator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_table_creator.py b/tests/test_table_creator.py
index 0a0e712d..649674a4 100644
--- a/tests/test_table_creator.py
+++ b/tests/test_table_creator.py
@@ -259,6 +259,10 @@ def test_tabs():
inter_cell='\t', post_line='\t')
assert row == ' Col 1 Col 2 '
+ with pytest.raises(ValueError) as excinfo:
+ TableCreator([column_1, column_2], tab_width=0)
+ assert "Tab width cannot be less than 1" in str(excinfo.value)
+
def test_simple_table_creation():
column_1 = Column("Col 1", width=16)