Fix mainwindow.statusbar.percentage tests.
This commit is contained in:
parent
d5888fea89
commit
49f017c0dd
@ -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:
|
||||
|
@ -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%]'
|
||||
|
Loading…
Reference in New Issue
Block a user