summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipalib/test_parameters.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-12-16 14:45:37 +0100
committerTomas Babej <tbabej@redhat.com>2015-01-14 11:40:28 +0100
commit61c4ecccc1df222b153236518c9be0ac3091f94a (patch)
treef8d222fee1c359c1e7403ab914ed7f619139e721 /ipatests/test_ipalib/test_parameters.py
parent10fe918acd8f7428588f2dff52f64070a9328c29 (diff)
downloadfreeipa-61c4ecccc1df222b153236518c9be0ac3091f94a.tar.gz
freeipa-61c4ecccc1df222b153236518c9be0ac3091f94a.tar.xz
freeipa-61c4ecccc1df222b153236518c9be0ac3091f94a.zip
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>
Diffstat (limited to 'ipatests/test_ipalib/test_parameters.py')
-rw-r--r--ipatests/test_ipalib/test_parameters.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/ipatests/test_ipalib/test_parameters.py b/ipatests/test_ipalib/test_parameters.py
index ee0f49d06..b466a4f22 100644
--- a/ipatests/test_ipalib/test_parameters.py
+++ b/ipatests/test_ipalib/test_parameters.py
@@ -22,6 +22,9 @@
Test the `ipalib.parameters` module.
"""
+# FIXME: Pylint errors
+# pylint: disable=no-member
+
import datetime
import re
import sys
@@ -219,12 +222,12 @@ class test_Param(ClassChecker):
# Test that ValueError is raised when a kwarg from a subclass
# conflicts with an attribute:
- class Subclass(self.cls):
+ class Subclass1(self.cls):
kwargs = self.cls.kwargs + (
('convert', callable, None),
)
- e = raises(ValueError, Subclass, name)
- assert str(e) == "kwarg 'convert' conflicts with attribute on Subclass"
+ e = raises(ValueError, Subclass1, name)
+ assert str(e) == "kwarg 'convert' conflicts with attribute on Subclass1"
# Test type validation of keyword arguments:
class Subclass(self.cls):
@@ -593,6 +596,8 @@ class test_Param(ClassChecker):
type = unicode
def __init__(self, name, **kw):
+ # (Pylint complains because the superclass is unknowm)
+ # pylint: disable=bad-super-call, super-on-old-class
self._convert_scalar = PassThrough()
super(Str, self).__init__(name, **kw)