[pytest-dev] Need access to parameter IDs during pytest_collection_modifyitems
Bruno Oliveira
nicoddemus at gmail.com
Thu Apr 6 15:51:29 EDT 2017
Hi Pete,
On Thu, Apr 6, 2017 at 7:26 AM Pete Savage <psavage at redhat.com> wrote:
> Is there any way I can construct this information?
>
I'm not sure, by the time modifyitems hook is called all items have already
been constructed, and the original ids seem to have been lost. See here:
https://github.com/pytest-dev/pytest/blob/master/_pytest/python.py#L851
This happens before the hook call, btw. An idea might have to hook earlier
than that, perhaps as a hookwrapper for one of the hooks which generate the
collected objects, and inspect the actual MarkInfo object. Sorry I can't
try to provide an example right now as I'm short on time.
Others might be able to provide some other ideas.
Cheers,
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20170406/0c652965/attachment.html>
More information about the pytest-dev
mailing list