diff options
Diffstat (limited to 'tests/functional/r/regression_02/regression_protected_access.py')
-rw-r--r-- | tests/functional/r/regression_02/regression_protected_access.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/functional/r/regression_02/regression_protected_access.py b/tests/functional/r/regression_02/regression_protected_access.py new file mode 100644 index 000000000..df36f6795 --- /dev/null +++ b/tests/functional/r/regression_02/regression_protected_access.py @@ -0,0 +1,19 @@ +"""Test for the regression on (outer)-class traversal for private methods +MyClass does not have an outerclass which previously crashed the protected-access check +""" +# pylint: disable=too-few-public-methods + + +class MyClass: + """Test class""" + + @staticmethod + def _a_private_method(): + """Private method that references the class itself""" + return MySecondClass.MyClass._a_private_method() # [protected-access] + + +class MySecondClass: + """Class that uses MyClass""" + + MyClass = MyClass |