1
1
mirror of https://github.com/dbcli/pgcli.git synced 2024-09-20 02:07:43 +03:00
pgcli/tests/test_tabulate.py

15 lines
360 B
Python

from pgcli.packages.tabulate import tabulate
from textwrap import dedent
def test_dont_strip_leading_whitespace():
data = [[' abc']]
headers = ['xyz']
tbl, _ = tabulate(data, headers, tablefmt='psql')
assert tbl == dedent('''
+---------+
| xyz |
|---------|
| abc |
+---------+ ''').strip()