Can't run test using markers along with pytest_plugins #10555
Unanswered
qb-nikola-popovic
asked this question in
Q&A
Replies: 1 comment 2 replies
-
The reason for the error is that you would indeed make anything you put into pytest-plugins a global plugin that is applied to everything Without more details on the setup it's unclear what to advise for |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there!
This is how my code structure looks like:
In
api/conftest.py
andmobile/conftest.py
I'm using pytest_plugins to invoke all the fixtures fromweb/conftest.py
. Something likeNow, I want to add the
markers
to all tests I have under api/mobile/web. I'm annotating tests with:I've also registered these markers in
pytest.ini
file:When running tests with
pytest -m api
/pytest -m mobile
/pytest -m web
, I'm getting following error:When running the the tests using markers and with commenting out this part of the code
pytest_plugins = "web.conftest"
it will work (but fixtures from web/conftest.py are not getting invoked and I need them).Anyone know how to fix this? Thank you in advance for help.
Beta Was this translation helpful? Give feedback.
All reactions