pylint: Disable protected-access for tests.
This commit is contained in:
parent
83a4451f93
commit
da9cb88c81
@ -52,6 +52,7 @@ def main():
|
|||||||
'redefined-outer-name',
|
'redefined-outer-name',
|
||||||
'unused-argument',
|
'unused-argument',
|
||||||
'missing-docstring',
|
'missing-docstring',
|
||||||
|
'protected-access',
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||||
'undefined-variable',
|
'undefined-variable',
|
||||||
]
|
]
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for the webelement utils."""
|
"""Tests for the webelement utils."""
|
||||||
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.config.config."""
|
"""Tests for qutebrowser.config.config."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.config.configtypes."""
|
"""Tests for qutebrowser.config.configtypes."""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for BaseKeyParser."""
|
"""Tests for BaseKeyParser."""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
@ -39,8 +39,6 @@ class TestsNormalKeyParser:
|
|||||||
kp: The NormalKeyParser to be tested.
|
kp: The NormalKeyParser to be tested.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
@pytest.yield_fixture(autouse=True)
|
@pytest.yield_fixture(autouse=True)
|
||||||
def setup(self, monkeypatch, stubs, config_stub, fake_keyconfig):
|
def setup(self, monkeypatch, stubs, config_stub, fake_keyconfig):
|
||||||
"""Set up mocks and read the test config."""
|
"""Set up mocks and read the test config."""
|
||||||
|
@ -50,4 +50,4 @@ def test_elided_text(qtbot, elidemode, check):
|
|||||||
label.setText(long_string)
|
label.setText(long_string)
|
||||||
label.resize(100, 50)
|
label.resize(100, 50)
|
||||||
label.show()
|
label.show()
|
||||||
assert check(label._elided_text) # pylint: disable=protected-access
|
assert check(label._elided_text)
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
"""Tests for qutebrowser.misc.editor."""
|
"""Tests for qutebrowser.misc.editor."""
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import logging
|
import logging
|
||||||
@ -46,7 +44,7 @@ class TestArg:
|
|||||||
stubs.fake_qprocess())
|
stubs.fake_qprocess())
|
||||||
self.editor = editor.ExternalEditor(0)
|
self.editor = editor.ExternalEditor(0)
|
||||||
yield
|
yield
|
||||||
self.editor._cleanup() # pylint: disable=protected-access
|
self.editor._cleanup()
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def stubbed_config(self, config_stub, monkeypatch):
|
def stubbed_config(self, config_stub, monkeypatch):
|
||||||
@ -229,7 +227,7 @@ class TestErrorMessage:
|
|||||||
monkeypatch.setattr('qutebrowser.misc.editor.config', config_stub)
|
monkeypatch.setattr('qutebrowser.misc.editor.config', config_stub)
|
||||||
self.editor = editor.ExternalEditor(0)
|
self.editor = editor.ExternalEditor(0)
|
||||||
yield
|
yield
|
||||||
self.editor._cleanup() # pylint: disable=protected-access
|
self.editor._cleanup()
|
||||||
|
|
||||||
def test_proc_error(self, caplog):
|
def test_proc_error(self, caplog):
|
||||||
"""Test on_proc_error."""
|
"""Test on_proc_error."""
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.misc.guiprocess."""
|
"""Tests for qutebrowser.misc.guiprocess."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.misc.lineparser."""
|
"""Tests for qutebrowser.misc.lineparser."""
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
"""Tests for qutebrowser.misc.readline."""
|
"""Tests for qutebrowser.misc.readline."""
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.utils.log."""
|
"""Tests for qutebrowser.utils.log."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
@ -928,8 +928,6 @@ class TestEventLoop:
|
|||||||
loop: The EventLoop we're testing.
|
loop: The EventLoop we're testing.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
def _assert_executing(self):
|
def _assert_executing(self):
|
||||||
"""Slot which gets called from timers to be sure the loop runs."""
|
"""Slot which gets called from timers to be sure the loop runs."""
|
||||||
assert self.loop._executing
|
assert self.loop._executing
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.utils.standarddir."""
|
"""Tests for qutebrowser.utils.standarddir."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.utils.urlutils."""
|
"""Tests for qutebrowser.utils.urlutils."""
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for qutebrowser.utils.version."""
|
"""Tests for qutebrowser.utils.version."""
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for the NeighborList class."""
|
"""Tests for the NeighborList class."""
|
||||||
|
|
||||||
from qutebrowser.utils import usertypes
|
from qutebrowser.utils import usertypes
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
|
||||||
|
|
||||||
"""Tests for Timer."""
|
"""Tests for Timer."""
|
||||||
|
|
||||||
from qutebrowser.utils import usertypes
|
from qutebrowser.utils import usertypes
|
||||||
|
Loading…
Reference in New Issue
Block a user