Make sure to read this post before raising a thread here:
@pytest.fixture
def fixture():
"""does something internally"""
def test_fixture(fixture):
assert 1 + 1 == 2
result:
class VarTest:
__var: int
@property
def var(self) -> int:
return self.__var
@pytest.fixture(autouse=True)
def __var_injector(self):
self.__var = random.randint(0, 100)
result:
Fixtures may do something internally. So assumption, that these 2 examples have unused variables is wrong.