@@ -73,28 +73,28 @@ class FixtureChecker(BasePytestChecker):
7373 }
7474
7575 # Store all fixtures discovered by pytest session
76- pytest_fixtures : FixtureDict = {}
76+ _pytest_fixtures : FixtureDict = {}
7777 # Stores all used function arguments
78- invoked_with_func_args : set [str ] = set ()
78+ _invoked_with_func_args : set [str ] = set ()
7979 # Stores all invoked fixtures through @pytest.mark.usefixture(...)
80- invoked_with_usefixtures : set [str ] = set ()
80+ _invoked_with_usefixtures : set [str ] = set ()
8181
8282 def close (self ):
8383 """restore & reset class attr for testing"""
8484 # reset fixture info storage
85- FixtureChecker .pytest_fixtures = {}
86- FixtureChecker .invoked_with_func_args = set ()
87- FixtureChecker .invoked_with_usefixtures = set ()
85+ FixtureChecker ._pytest_fixtures = {}
86+ FixtureChecker ._invoked_with_func_args = set ()
87+ FixtureChecker ._invoked_with_usefixtures = set ()
8888
8989 def visit_module (self , node ):
9090 """
9191 - only run once per module
9292 - invoke pytest session to collect available fixtures
9393 - create containers for the module to store args and fixtures
9494 """
95- FixtureChecker .pytest_fixtures = {}
96- FixtureChecker .invoked_with_func_args = set ()
97- FixtureChecker .invoked_with_usefixtures = set ()
95+ FixtureChecker ._pytest_fixtures = {}
96+ FixtureChecker ._invoked_with_func_args = set ()
97+ FixtureChecker ._invoked_with_usefixtures = set ()
9898
9999 is_test_module = False
100100 for pattern in FILE_NAME_PATTERNS :
@@ -128,7 +128,7 @@ def visit_module(self, node):
128128 # restore sys.path
129129 sys .path = sys_path
130130
131- FixtureChecker .pytest_fixtures = fixture_collector .fixtures
131+ FixtureChecker ._pytest_fixtures = fixture_collector .fixtures
132132
133133 legitimate_failure_paths = set (
134134 collection_report .nodeid
@@ -212,11 +212,11 @@ def visit_functiondef(self, node):
212212 if _is_pytest_mark_usefixtures (decorator ):
213213 # save all visited fixtures
214214 for arg in decorator .args :
215- self .invoked_with_usefixtures .add (arg .value )
215+ self ._invoked_with_usefixtures .add (arg .value )
216216 if int (pytest .__version__ .split ("." )[0 ]) >= 3 and _is_pytest_fixture (
217217 decorator , fixture = False
218218 ):
219219 # raise deprecated warning for @pytest.yield_fixture
220220 self .add_message ("deprecated-pytest-yield-fixture" , node = node )
221221 for arg in node .args .args :
222- self .invoked_with_func_args .add (arg .name )
222+ self ._invoked_with_func_args .add (arg .name )
0 commit comments