Merging upstream version 2.2.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4db980c3c4
commit
04b7f07412
9 changed files with 50 additions and 22 deletions
|
@ -214,13 +214,21 @@ def test_enforce_iterable():
|
|||
assert False, "{0} doesn't return iterable".format(format_name)
|
||||
|
||||
|
||||
def test_all_text_type():
|
||||
@pytest.mark.parametrize(
|
||||
"extra_kwargs",
|
||||
[
|
||||
{},
|
||||
{"style": "default"},
|
||||
{"style": "colorful"},
|
||||
],
|
||||
)
|
||||
def test_all_text_type(extra_kwargs):
|
||||
"""Test the TabularOutputFormatter class."""
|
||||
data = [[1, "", None, Decimal(2)]]
|
||||
headers = ["col1", "col2", "col3", "col4"]
|
||||
output_formatter = TabularOutputFormatter()
|
||||
for format_name in output_formatter.supported_formats:
|
||||
for row in output_formatter.format_output(
|
||||
iter(data), headers, format_name=format_name
|
||||
iter(data), headers, format_name=format_name, **extra_kwargs
|
||||
):
|
||||
assert isinstance(row, text_type), "not unicode for {}".format(format_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue