tests: Clean up test_column_widths
This commit is contained in:
parent
4c2b64b573
commit
cfbd02eaba
@ -31,23 +31,20 @@ from qutebrowser.completion.models.miscmodels import (
|
|||||||
from qutebrowser.completion.models.urlmodel import UrlCompletionModel
|
from qutebrowser.completion.models.urlmodel import UrlCompletionModel
|
||||||
|
|
||||||
|
|
||||||
class TestColumnWidths:
|
CLASSES = [BaseCompletionModel, SettingOptionCompletionModel,
|
||||||
|
|
||||||
"""Tests for the column widths of the completion models."""
|
|
||||||
|
|
||||||
CLASSES = [BaseCompletionModel, SettingOptionCompletionModel,
|
|
||||||
SettingOptionCompletionModel, SettingSectionCompletionModel,
|
SettingOptionCompletionModel, SettingSectionCompletionModel,
|
||||||
SettingValueCompletionModel, CommandCompletionModel,
|
SettingValueCompletionModel, CommandCompletionModel,
|
||||||
HelpCompletionModel, QuickmarkCompletionModel,
|
HelpCompletionModel, QuickmarkCompletionModel,
|
||||||
BookmarkCompletionModel, SessionCompletionModel,
|
BookmarkCompletionModel, SessionCompletionModel, UrlCompletionModel]
|
||||||
UrlCompletionModel]
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("model", CLASSES)
|
|
||||||
def test_list_size(self, model):
|
@pytest.mark.parametrize("model", CLASSES)
|
||||||
|
def test_list_size(model):
|
||||||
"""Test if there are 3 items in the COLUMN_WIDTHS property."""
|
"""Test if there are 3 items in the COLUMN_WIDTHS property."""
|
||||||
assert len(model.COLUMN_WIDTHS) == 3
|
assert len(model.COLUMN_WIDTHS) == 3
|
||||||
|
|
||||||
@pytest.mark.parametrize("model", CLASSES)
|
|
||||||
def test_column_width_sum(self, model):
|
@pytest.mark.parametrize("model", CLASSES)
|
||||||
|
def test_column_width_sum(model):
|
||||||
"""Test if the sum of the widths asserts to 100."""
|
"""Test if the sum of the widths asserts to 100."""
|
||||||
assert sum(model.COLUMN_WIDTHS) == 100
|
assert sum(model.COLUMN_WIDTHS) == 100
|
||||||
|
Loading…
Reference in New Issue
Block a user