document how a fixture can depend on another fixture behaviour, but not on its return value #12923
Labels
topic: fixtures
anything involving fixtures directly or indirectly
type: question
general question, might be closed after 2 weeks of inactivity
I am looking at #1014 and related bugs, there are few on the subject.
It is still unclear to me what do to when a fixture uses another fixture, but it does not refer to it in the code.
From 2013 (the older but on the subject I found), when the ticket was raised, things have changed and now we have really strong type checking and linters.
An example of the code which would raise linters concerns is:
foo
does not know whatbar
do, and does not care whatbar
return value is. the code is unaware.foo
depends on the behaviours ofbar
, but does not refer to it. so any modern linter would raise it as a problem: unused-arguementThis is solved in test cases with
usefixtures()
which injects them without putting them in the scope fo the test code.how is it supposed to work with fixtures?
a valid solution to this ticket to me would be:
usefixtures()
The text was updated successfully, but these errors were encountered: