pylint: Disable protected-access for tests.

This commit is contained in:
Florian Bruhin 2015-08-12 06:42:41 +02:00
parent 83a4451f93
commit da9cb88c81
18 changed files with 4 additions and 35 deletions

View File

@ -52,6 +52,7 @@ def main():
'redefined-outer-name',
'unused-argument',
'missing-docstring',
'protected-access',
# https://bitbucket.org/logilab/pylint/issue/511/
'undefined-variable',
]

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for the webelement utils."""
from unittest import mock

View File

@ -16,8 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.config.config."""
import os

View File

@ -16,8 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.config.configtypes."""
import re

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for BaseKeyParser."""
import sys

View File

@ -39,8 +39,6 @@ class TestsNormalKeyParser:
kp: The NormalKeyParser to be tested.
"""
# pylint: disable=protected-access
@pytest.yield_fixture(autouse=True)
def setup(self, monkeypatch, stubs, config_stub, fake_keyconfig):
"""Set up mocks and read the test config."""

View File

@ -50,4 +50,4 @@ def test_elided_text(qtbot, elidemode, check):
label.setText(long_string)
label.resize(100, 50)
label.show()
assert check(label._elided_text) # pylint: disable=protected-access
assert check(label._elided_text)

View File

@ -19,8 +19,6 @@
"""Tests for qutebrowser.misc.editor."""
# pylint: disable=protected-access
import os
import os.path
import logging
@ -46,7 +44,7 @@ class TestArg:
stubs.fake_qprocess())
self.editor = editor.ExternalEditor(0)
yield
self.editor._cleanup() # pylint: disable=protected-access
self.editor._cleanup()
@pytest.fixture
def stubbed_config(self, config_stub, monkeypatch):
@ -229,7 +227,7 @@ class TestErrorMessage:
monkeypatch.setattr('qutebrowser.misc.editor.config', config_stub)
self.editor = editor.ExternalEditor(0)
yield
self.editor._cleanup() # pylint: disable=protected-access
self.editor._cleanup()
def test_proc_error(self, caplog):
"""Test on_proc_error."""

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.misc.guiprocess."""
import os

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.misc.lineparser."""
import io

View File

@ -19,8 +19,6 @@
"""Tests for qutebrowser.misc.readline."""
# pylint: disable=protected-access
import re
import inspect

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.utils.log."""
import logging

View File

@ -928,8 +928,6 @@ class TestEventLoop:
loop: The EventLoop we're testing.
"""
# pylint: disable=protected-access
def _assert_executing(self):
"""Slot which gets called from timers to be sure the loop runs."""
assert self.loop._executing

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.utils.standarddir."""
import os

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.utils.urlutils."""
import os.path

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for qutebrowser.utils.version."""
import io

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for the NeighborList class."""
from qutebrowser.utils import usertypes

View File

@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=protected-access
"""Tests for Timer."""
from qutebrowser.utils import usertypes