PT019
pytest-fixture-param-without-value
False positive when using patch
#11463
Labels
bug
Something isn't working
This presumably applies to any test function with an unused argument, which is not actually a test fixture. But I'm specifically in the situation bellow.
I am using pytest, but also using unittest.mock.patch to modify the behaviour of my test target. The patch decorator returns the mocked object as an argument so I have to accept it, even though I don't use it. PT019 then assumes I'm receiving an unused fixture, and suggests a fix that doesn't work.
The text was updated successfully, but these errors were encountered: