summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Pool <mbp@google.com>2013-01-08 18:35:22 +0100
committerMartin Pool <mbp@google.com>2013-01-08 18:35:22 +0100
commitd39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd (patch)
tree91083d983813ce572b4f9ec8ac18afb0da44e750 /test
parent6441eac02dc68b847a5b0af2c7e3626cbcffaa27 (diff)
downloadpylint-d39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd.tar.gz
erroneous W0212 (access to protected member) on super call. Closes #115580
Diffstat (limited to 'test')
-rw-r--r--test/input/func_noerror_super_protected.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/input/func_noerror_super_protected.py b/test/input/func_noerror_super_protected.py
new file mode 100644
index 0000000..5e78eea
--- /dev/null
+++ b/test/input/func_noerror_super_protected.py
@@ -0,0 +1,22 @@
+"""Accessing a protected method through super() is ok."""
+
+# pylint: disable=missing-docstring,too-few-public-methods
+
+__revision__ = None
+
+class Alpha(object):
+
+ _secret = 2
+
+ def test(self):
+ print "test %s" % self
+
+
+class Beta(Alpha):
+
+ def test(self):
+ print super(Beta, self)._secret
+ super(Beta, self).test()
+
+
+Beta().test()