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', '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',
] ]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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."""

View File

@ -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)

View File

@ -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."""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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