##// END OF EJS Templates
utils/tests: move to pytest.mark.parameterize in test_text.py
Nate Rush -
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.
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 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.
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 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