I'm working on developing some Behavior Driven Development i.e style tests using pytest-bdd. We want to re-use the same features and more or less the same step definitions to having both stubbed and live calls to a third party API i.e. we want to reuse test code for integration and end to end testing.
I'm wondering about whether there was a convention on how to handle alternating between mocked and real calls in pytest_bdd or pytest
This question is similar: Running pytest tests against multiple backends? with an answer to add a parser option with a pytest_addoption
hook placed in the top level conftest.py
.