Pytest fixtures marked as unused

Make sure to read this post before raising a thread here:

def fixture():
    """does something internally"""

def test_fixture(fixture):
    assert 1 + 1 == 2


class VarTest:
    __var: int

    def var(self) -> int:
        return self.__var

    def __var_injector(self):
        self.__var = random.randint(0, 100)


Fixtures may do something internally. So assumption, that these 2 examples have unused variables is wrong.

Hey there.

As in your previous post:

Hello @Grzegorz_Ryznar,

First, thank you for reporting the false positive.
We already noticed it and fixed it in this ticket. I see you’re using SonarLint in PyCharm. As far as I know, the latest version doesn’t embed the fix, but the next one that should be released in the next few weeks will.

Hope that helps,

Great! Thanks for the response! But after acquaintance with this issue on Jira I’ve noticed that second problem(autoused fixture) is not covered. Will this fix cover that too?