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