Skip to content

Commit

Permalink
Support pytest_bdd 7.1.2 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
musicinmybrain committed Mar 27, 2024
1 parent 2af05e4 commit 71c9ffa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/lib/when_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
from pytest_bdd import when
from pytest_bdd.parsers import parse
from pytest_bdd.parsers import re
from pytest_bdd.steps import inject_fixture
# This is an undocumented and unsupported function:
# https://github.com/pytest-dev/pytest-bdd/issues/684
try:
from pytest_bdd.compat import inject_fixture # pytest_bdd 7.1.2 and later
except ImportError:
from pytest_bdd.steps import inject_fixture # pytest_bdd 7.1.1 and earlier

from jrnl.main import run

Expand Down

0 comments on commit 71c9ffa

Please sign in to comment.