[pytest-dev] trying to figure out which hook(s) I need to use...

Dj Gilcrease digitalxero at gmail.com
Wed Oct 3 10:36:26 EDT 2018


I am attempting to build a plugin which

given
1. discover-able tests; test_foos.py::test_a, test_users.py::test_b,
test_foos.py::test_c, test_foos.py::test_d
2. a "plan" structure like https://pastebin.com/dBwjshRm

will produce output like https://pastebin.com/hJ7LGPBY

I have the logic in pytest_collection_modifyitems to do so, but
the parameterize mark does not work there since
pytest_collection_modifyitems  is run after pytest_generate_tests and
pytest_generate_tests does not seem to have access to enough context to
allow me to know which set of parameters I need to use.

The main complication is that tests can appear multiple times in a
plan/scenario, be parameterized with differing values, and must maintain
execution order defined in the plan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20181003/b3d6c598/attachment.html>


More information about the pytest-dev mailing list