You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was expecting an interface like item: item.get_marker('cross_browser') and it took me a while to hunt down this solution.
It seems like it would be a fairly straight forward addition, and I'd be willing to try rustling up a PR. Is there a reason that this isn't a feature already or is it just a matter of someone doing it?
ronny, i see that as an orthogonal issue and one which i don't understand in detail. Maybe you can take it to the pytest-dev ML sometime to detail your reasoning behind the suggestion.
@ThomasWaldmann the plan was to introduce the FunctionDefinition node in the official collection tree since quite a while, but i failed 2 different structural attempts to integrate it already
Activity
hpk42 commentedon Mar 2, 2016
indeed, a
metafunc.get_marker()looks like a very useful addition. Please go for a PR against the "features" branch :)RonnyPfannschmidt commentedon Mar 2, 2016
Btw, Imho we should Phase out metafunc in 3.x, its a artifact of unfortunate structure
hpk42 commentedon Mar 2, 2016
ronny, i see that as an orthogonal issue and one which i don't understand in detail. Maybe you can take it to the pytest-dev ML sometime to detail your reasoning behind the suggestion.
RonnyPfannschmidt commentedon Mar 2, 2016
Will do at the office
RonnyPfannschmidt commentedon Jun 23, 2017
closing this one as superseeded
ThomasWaldmann commentedon Nov 15, 2018
So, how can I access markers "the new way" from this function?
I read some docs, but that is still totally unclear to me and it seems that I also miss a
get_markerfunction on the metafunc.RonnyPfannschmidt commentedon Nov 15, 2018
@ThomasWaldmann
metafunc.node.iter_markersThomasWaldmann commentedon Nov 15, 2018
@RonnyPfannschmidt thanks!
Is
nodea undocumented feature? https://docs.pytest.org/en/latest/reference.html#metafuncThomasWaldmann commentedon Nov 15, 2018
RonnyPfannschmidt commentedon Nov 15, 2018
i'm sorry, i did miss remember, based on
pytest/src/_pytest/python.py
Line 875 in 9dec146
definitionnot nodeThomasWaldmann commentedon Nov 15, 2018
Also undocumented, but works. I get the
Markinstance now.RonnyPfannschmidt commentedon Nov 15, 2018
@ThomasWaldmann the plan was to introduce the FunctionDefinition node in the official collection tree since quite a while, but i failed 2 different structural attempts to integrate it already