Show More
@@ -80,22 +80,20 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]: |
|
|||
89 |
|
|
88 | out = text.columnize(items, row_first=row_first, displaywidth=80) | |
90 |
|
|
89 | 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]: |
|
|||
99 |
|
|
97 | out = text.columnize(items, row_first=row_first, displaywidth=size - 1) | |
100 |
|
|
98 | assert out == "\n".join(items + [""]), "row_first={0}".format(row_first) | |
101 |
|
99 |
General Comments 0
You need to be logged in to leave comments.
Login now