mirror of
https://github.com/dbcli/pgcli.git
synced 2024-10-06 10:17:15 +03:00
15 lines
360 B
Python
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()
|