Fix mainwindow.statusbar.percentage tests.

This commit is contained in:
Florian Bruhin 2015-08-02 01:52:22 +02:00
parent d5888fea89
commit 49f017c0dd
2 changed files with 3 additions and 3 deletions

View File

@ -34,11 +34,11 @@ class Percentage(textbase.TextBase):
self.set_perc(0, 0)
@pyqtSlot(int, int)
def set_perc(self, _, y):
def set_perc(self, x, y): # pylint: disable=unused-argument
"""Setter to be used as a Qt slot.
Args:
_: The x percentage (int), currently ignored.
x: The x percentage (int), currently ignored.
y: The y percentage (int)
"""
if y == 0:

View File

@ -61,6 +61,6 @@ def test_percentage_text(percentage, y, expected):
def test_tab_change(percentage):
"""Make sure the percentage gets changed correctly when switching tabs."""
percentage.set_perc(x=None, y=10)
tab = FakeTab(20)
tab = FakeTab([0, 20])
percentage.on_tab_changed(tab)
assert percentage.text() == '[20%]'