Perfect coverage for sortfilter.

Mark an area of sortfilter with `#pragma no coverage` and add it to
perfect_files.
This commit is contained in:
Ryan Roden-Corrent 2016-08-06 20:48:21 -04:00
parent 3e1409b1f5
commit adc428e525
2 changed files with 4 additions and 2 deletions

View File

@ -135,8 +135,8 @@ class CompletionFilterModel(QSortFilterProxyModel):
for col in self.srcmodel.columns_to_filter:
idx = self.srcmodel.index(row, col, parent)
if not idx.isValid():
# No entries in parent model
if not idx.isValid(): # pragma: no cover
# this is a sanity check not hit by any test case
continue
data = self.srcmodel.data(idx)
if not data:

View File

@ -150,6 +150,8 @@ PERFECT_FILES = [
('tests/unit/completion/test_models.py',
'qutebrowser/completion/models/base.py'),
('tests/unit/completion/test_sortfilter.py',
'qutebrowser/completion/models/sortfilter.py'),
]