Skip to content

Commit

Permalink
Add test for NaN auto-format
Browse files Browse the repository at this point in the history
  • Loading branch information
foutaise committed Jun 24, 2019
1 parent d5540ac commit 85eb39a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,18 @@ def test_chaining():
.add_rows([list('ghi')], False)
.draw())
assert s1 == s2

def test_nan():
table = Texttable()
table.set_cols_align(["l"])
table.add_rows([
["A NaN"],
["NaN"],
])
assert clean(table.draw()) == u_dedent('''\
+-------+
| A NaN |
+=======+
| NaN |
+-------+
''')

0 comments on commit 85eb39a

Please sign in to comment.