Whitelist prompt.py for 100% coverage check.

It has 100% due to integration tests, but no unit tests yet.
This commit is contained in:
Florian Bruhin 2016-01-10 23:22:44 +01:00
parent 20610807c1
commit 5ddc94bc8d

View File

@ -133,6 +133,12 @@ PERFECT_FILES = [
]
# 100% coverage because of integration tests, but no perfect unit tests yet.
WHITELISTED_FILES = [
'qutebrowser/mainwindow/statusbar/prompt.py'
]
class Skipped(Exception):
"""Exception raised when skipping coverage checks."""
@ -199,7 +205,8 @@ def check(fileobj, perfect_files):
text = "{} has {}% line and {}% branch coverage!".format(
filename, line_cov, branch_cov)
messages.append(Message(MsgType.insufficent_coverage, text))
elif filename not in perfect_src_files and not is_bad:
elif (filename not in perfect_src_files and not is_bad and
filename not in WHITELISTED_FILES):
text = ("{} has 100% coverage but is not in "
"perfect_files!".format(filename))
messages.append(Message(MsgType.perfect_file, text))