summaryrefslogtreecommitdiff
path: root/tests/test_table_creator.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2021-04-03 18:41:26 -0400
committeranselor <anselor@gmail.com>2021-04-06 14:54:28 -0400
commit50d302913328931ecc9f61293892ac8f9aa61890 (patch)
treeb67f5586861cc57094f63efb27cf628476d7b544 /tests/test_table_creator.py
parentd309493f29750433fd8bd6158bc194ed46fa0f7f (diff)
downloadcmd2-git-50d302913328931ecc9f61293892ac8f9aa61890.tar.gz
And that's the last of it. Passes mypy.
Diffstat (limited to 'tests/test_table_creator.py')
-rw-r--r--tests/test_table_creator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_table_creator.py b/tests/test_table_creator.py
index ee15bb22..6e98baa4 100644
--- a/tests/test_table_creator.py
+++ b/tests/test_table_creator.py
@@ -40,31 +40,31 @@ def test_column_creation():
# No width specified, blank label
c = Column("")
- assert c.width is None
+ assert c.width < 0
tc = TableCreator([c])
assert tc.cols[0].width == 1
# No width specified, label isn't blank but has no width
c = Column(ansi.style('', fg=ansi.fg.green))
- assert c.width is None
+ assert c.width < 0
tc = TableCreator([c])
assert tc.cols[0].width == 1
# No width specified, label has width
c = Column("a line")
- assert c.width is None
+ assert c.width < 0
tc = TableCreator([c])
assert tc.cols[0].width == ansi.style_aware_wcswidth("a line")
# No width specified, label has width and multiple lines
c = Column("short\nreally long")
- assert c.width is None
+ assert c.width < 0
tc = TableCreator([c])
assert tc.cols[0].width == ansi.style_aware_wcswidth("really long")
# No width specified, label has tabs
c = Column("line\twith\ttabs")
- assert c.width is None
+ assert c.width < 0
tc = TableCreator([c])
assert tc.cols[0].width == ansi.style_aware_wcswidth("line with tabs")