diff options
Diffstat (limited to 'tests/functional/p/protected_access.py')
-rw-r--r-- | tests/functional/p/protected_access.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/functional/p/protected_access.py b/tests/functional/p/protected_access.py index 209f571c4..6587e50a7 100644 --- a/tests/functional/p/protected_access.py +++ b/tests/functional/p/protected_access.py @@ -3,6 +3,8 @@ # pylint: disable=missing-function-docstring, invalid-metaclass, no-member # pylint: disable=no-self-argument, undefined-variable, unused-variable +import os + # Test that exclude-protected can be used to exclude names from protected-access warning class Protected: def __init__(self): @@ -41,3 +43,12 @@ class Light: def func(light: Light) -> None: print(light._light_internal) # [protected-access] + + +# os._exit is excluded from the protected-access check by default +print(os._exit) + +# BaseTomato._sauce is included in the `exclude-protected` list +# and does not emit a `protected-access` message: +class BaseTomato: + _sauce = 42 |