[pytest-dev] Adding a marker to items that have a fixture
Craig de Stigter
craig.ds at gmail.com
Wed May 1 22:18:42 EDT 2019
Not sure if I'm missing something in the docs. I'm trying to add a marker
to every test that's decorated with a given fixture. What I have currently
if 'solr' in item.fixturenames:
# so you can skip it with "-m 'not solr'"
This sort of works ( the marker is present by the time the test runs), but
command-line filtering options (`-m 'not solr'`) don't filter based on it.
I guess this hook is running after those options have been consulted?
I also tried the same thing in pytest_collection_modifyitems, but that
happens later so is even less likely to work.
Is there an earlier hook where I can modify an item before the command line
filtering options are checked?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pytest-dev