diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index a765cd977..ef677f120 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -989,9 +989,6 @@ def test_random_port(): class TestOpenFile: - def __init__(self): - self.open_url_called = False - def test_cmdline_without_argument(self, caplog, config_stub): config_stub.data = {'general': {'default-open-dispatcher': ''}} cmdline = '{} -c pass'.format(sys.executable) @@ -1018,6 +1015,8 @@ class TestOpenFile: def test_system_default_application(self, caplog, config_stub, monkeypatch): + # pylint: disable=attribute-defined-outside-init + self.open_url_called = False config_stub.data = {'general': {'default-open-dispatcher': ''}} monkeypatch.setattr('PyQt5.QtGui.QDesktopServices.openUrl', self.mock_open_url) @@ -1028,4 +1027,5 @@ class TestOpenFile: assert self.open_url_called def mock_open_url(self, url): + # pylint: disable=attribute-defined-outside-init self.open_url_called = True