Run pylint on tests

Drop support for pylint < 1.0

Enable ignoring unknown attributes on modules (both nose and pytest
use advanced techniques, support for which only made it to pylint
recently)

Fix some bugs revealed by pylint

Do minor refactoring or add pylint:disable directives where the
linter complains.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Petr Viktorin
2014-12-16 14:45:37 +01:00
committed by Tomas Babej
parent 10fe918acd
commit 61c4ecccc1
16 changed files with 77 additions and 66 deletions

View File

@@ -21,6 +21,9 @@
Test the `ipalib.plugable` module.
"""
# FIXME: Pylint errors
# pylint: disable=no-member
import inspect
from ipatests.util import raises, no_set, no_del, read_only
from ipatests.util import getitem, setitem, delitem
@@ -343,7 +346,7 @@ def test_Registrar():
orig1 = plugin1
class base1_extended(Base1):
pass
class plugin1(base1_extended):
class plugin1(base1_extended): # pylint: disable=function-redefined
pass
e = raises(errors.PluginOverrideError, r, plugin1)
assert e.base == 'Base1'