-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests failing on develop branch starting with pytest-bdd 7.1.2 #1875
Comments
It looks like version pinning is a bit trickier than I'd thought, I think due to irregularities between how poetry and tox handle pytest plugin versions. Probably better to spend time on just fixing the root cause. |
The immediate workaround would be something like: try:
from pytest_bdd.compat import inject_fixture # since pytest_bdd 7.1.2
except ImportError:
from pytest_bdd.steps import inject_fixture # before pytest_bdd 7.1.2 but perhaps it would be worth considering, in the medium term, whether there is an alternative to using an unsupported function that could move again or disappear. |
Alternatively, I guess you could just |
* Support pytest_bdd 7.1.2 and later Fix #1875. * Prevent use of pytest 8.1 for now due to unrelated error * poetry lock --no-update --------- Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
Diagnostic output
n/a
Current Behavior
Around a week ago, pytest-bdd 7.1.2 was released and all of our PRs started failing tests with this error on
tests/lib/when_steps.py
:Expected Behavior
Tests should be running fine. This patch release of pytest-bdd is a breaking change for us, though.
Repro Steps
pytest-bdd = "7.1.1"
poetry install
andpoetry run pytest
. Everything passes.pytest-bdd = "7.1.2"
poetry install
andpoetry run pytest
. Everything fails.Debug output
n/a
Other Information
I don't have a lot of time to look at this now, and am tempted to pin pytest to 7.1.1 for now just to be able to get through PRs, though if a contributor has a fix for this, it would be welcome.
The text was updated successfully, but these errors were encountered: