100% coverage for mainwindow.statusbar.progress.

This commit is contained in:
Florian Bruhin 2015-08-02 01:49:33 +02:00
parent fc09d63eb1
commit d5888fea89
2 changed files with 4 additions and 2 deletions

View File

@ -66,10 +66,10 @@ class Progress(QProgressBar):
@pyqtSlot(int)
def on_tab_changed(self, tab):
"""Set the correct value when the current tab changed."""
if self is None:
if self is None: # pragma: no branch
# This should never happen, but for some weird reason it does
# sometimes.
return
return # pragma: no cover
self.setValue(tab.progress)
if tab.load_status == webview.LoadStatus.loading:
self.show()

View File

@ -35,8 +35,10 @@ PERFECT_FILES = [
'qutebrowser/commands/cmdexc.py',
'qutebrowser/misc/readline.py',
'qutebrowser/browser/tabhistory.py',
'qutebrowser/mainwindow/statusbar/keystring.py',
'qutebrowser/mainwindow/statusbar/percentage.py',
'qutebrowser/mainwindow/statusbar/progress.py',
'qutebrowser/config/configtypes.py',
'qutebrowser/config/configdata.py',