Show More
@@ -80,24 +80,22 b' def test_columnize_random():' | |||||
80 | ) |
|
80 | ) | |
81 |
|
81 | |||
82 |
|
82 | |||
83 | # TODO: pytest mark.parametrize once nose removed. |
|
83 | @pytest.mark.parametrize('row_first', [True, False]) | |
84 | def test_columnize_medium(): |
|
84 | def test_columnize_medium(row_first): | |
85 | """Test with inputs than shouldn't be wider than 80""" |
|
85 | """Test with inputs than shouldn't be wider than 80""" | |
86 | size = 40 |
|
86 | size = 40 | |
87 | items = [l*size for l in 'abc'] |
|
87 | items = [l*size for l in 'abc'] | |
88 | for row_first in [True, False]: |
|
88 | out = text.columnize(items, row_first=row_first, displaywidth=80) | |
89 | out = text.columnize(items, row_first=row_first, displaywidth=80) |
|
89 | assert out == "\n".join(items + [""]), "row_first={0}".format(row_first) | |
90 | assert out == "\n".join(items + [""]), "row_first={0}".format(row_first) |
|
|||
91 |
|
90 | |||
92 |
|
91 | |||
93 | # TODO: pytest mark.parametrize once nose removed. |
|
92 | @pytest.mark.parametrize('row_first', [True, False]) | |
94 | def test_columnize_long(): |
|
93 | def test_columnize_long(row_first): | |
95 | """Test columnize with inputs longer than the display window""" |
|
94 | """Test columnize with inputs longer than the display window""" | |
96 | size = 11 |
|
95 | size = 11 | |
97 | items = [l*size for l in 'abc'] |
|
96 | items = [l*size for l in 'abc'] | |
98 | for row_first in [True, False]: |
|
97 | out = text.columnize(items, row_first=row_first, displaywidth=size - 1) | |
99 | out = text.columnize(items, row_first=row_first, displaywidth=size - 1) |
|
98 | assert out == "\n".join(items + [""]), "row_first={0}".format(row_first) | |
100 | assert out == "\n".join(items + [""]), "row_first={0}".format(row_first) |
|
|||
101 |
|
99 | |||
102 |
|
100 | |||
103 | def eval_formatter_check(f): |
|
101 | def eval_formatter_check(f): |
General Comments 0
You need to be logged in to leave comments.
Login now