forked from PyCQA/pylint-pytest
- Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Bug description
# Given some PyTest class with a setup_teardown class TestFile: @pytest.fixture(scope="class") def setup_teardown_environment(self, request: pytest.FixtureRequest): # The following line assigns a value to `temp1` which can be accessed throughout # the test class via `self` request.cls.temp1 = 54321 print(self.temp1) # This executes via PyTest successfully # PyLint check throws this error: Instance of 'TestFile' has no 'temp1' member # PylintE1101:no-memberCommand used
pylint ${file}Pylint output
Instance of 'TestFile' has no 'temp1' member PylintE1101:no-memberExpected behavior
PyLint should not identify this as a problem at all, as request.cls and self are intrinsically linked when operating within the same test class.
Pylint version
pylint 3.2.3 astroid 3.2.2 Python 3.11.4 (main, May 8 2024, 12:11:54) [GCC 9.4.0]OS / Environment
Ubuntu 20
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request