Open The-Compiler opened 5 months ago
We should start to warn and consider turning it into a error next major release
I am currently working on this issue, would it be better to issue a warning or raise an error?
I agree with what Ronny has said above, let's start with a warning
Hello. I would love to contribute, but I am not sure how to do so. However, my idea is that we can use the already imported warning module and warn the user whenever node.iter_markers(name="usefixtures") is empty. Hopefully someone can implement it and give it a try!
Someone in my pytest training accidentally did:
but forgot to pass a fixture name. Because we do:
https://github.com/pytest-dev/pytest/blob/0070151c630b30e38381f1a3a00e263de4665e26/src/_pytest/fixtures.py#L1536-L1539
That results in the mark being silently ignored. IMHO, this should result in a warning or even error instead.
I think this would be a great beginner issue for someone that never contributed to pytest before. Maybe someone at the upcoming sprint wants to take a look?