-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mark fixtures #2872
Comments
this is currently not implemented and currently impossible to correctly implement due to massive issues in the mark system |
then is there a mark system refactor in plan? 👍 |
yes - there was a ml thread, an the next step is killing old style marker transfer in favour of nodes owning their marks however this still doesnt solve the fixture case as we would need to collect the complete fixture dependency/override graph and all marks within it in order to pass the data along in addition markers like parametrize would be a pain if they where passed around that way on top of that fixture params expansion may bring in marks that are passed in already |
is there a place we can follow the progress of this beside the mailing list? |
there is a project about sorting the mark issues out here in the issue tracker |
@RonnyPfannschmidt @nicoddemus we the revamp of the fixtures is now possible to achieve this? |
Per #3664, we have decided not to support marks on fixtures, and make this into an explicit error. |
I don't see any explanation why this is the case 🤔 is this a bad practice? |
IIts simply an utter hell when matching various use-cases, not doing something incredible hhard and error prone is vital for the sustenance of a volunteer driven project |
I guess here lies my limitation, don't know how hard it is. In my mind is just interating over all tests and all which have a fixture get a mark. This could be a final phase at the end of test collection. |
Its technically impossible to do it correctly withe the current structure oof the fixture system |
Just to add to @RonnyPfannschmidt's response: after collection, pytest doesn't have a map of which fixtures are used by which tests, fixtures are created lazily during test setup or even inside tests themselves using |
What do you think of a This allows for applying marks to tests using specific fixtures, and then That way you basically get the originally requested feature (what I understood from skimming), but it is more dynamic in general. |
as proposed, i'm strictly opposed |
Care to elaborate? |
its the wrong place to put it(cli options) , the implementation is wrong as it auto-adds "wrong" / missing marks , furthermore its limited by name, which is limited for setups where a reshaped fixture is in use in sub-tress for example basically its defined at the wrong place, sets details wrong and is impossible to extend |
Thanks for the explanation.
Why?
That's the point: auto-adding marks.
It's not meant for complex setups. |
Is it possible to mark a fixture? E.g. if I have a slow fixture, can I mark the fixture as slow, which then would propagate to mark all tests using that fixture as slow. How hard is to achieve this? Thanks!
The text was updated successfully, but these errors were encountered: