Update linting for tests
This commit is contained in:
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
@@ -35,11 +35,9 @@ class MockWidget(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__(None)
|
||||
self.count = 0
|
||||
return
|
||||
|
||||
def wheelEvent(self, event: QWheelEvent) -> None:
|
||||
self.count += 1
|
||||
return
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
||||
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
@@ -43,12 +43,10 @@ class MockWheelEvent(QWheelEvent):
|
||||
Qt.ScrollPhase.ScrollUpdate, False
|
||||
)
|
||||
self.ignored = False
|
||||
return
|
||||
|
||||
def ignore(self):
|
||||
super().ignore()
|
||||
self.ignored = True
|
||||
return
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
||||
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
from time import sleep
|
||||
|
||||
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
from urllib.error import HTTPError
|
||||
@@ -44,7 +44,6 @@ class MockDesktopServices:
|
||||
@staticmethod
|
||||
def openUrl(url):
|
||||
MockDesktopServices.url = url
|
||||
return
|
||||
|
||||
|
||||
class MockData:
|
||||
@@ -61,8 +60,7 @@ class MockPayload:
|
||||
return
|
||||
|
||||
def read(self):
|
||||
data = MockData()
|
||||
return data
|
||||
return MockData()
|
||||
|
||||
|
||||
class MockHTTPError:
|
||||
|
||||
Reference in New Issue
Block a user