Skip to content

Commit

Permalink
Support pytest_bdd 7.1.2 and later
Browse files Browse the repository at this point in the history
Fix #1875.
  • Loading branch information
musicinmybrain committed Mar 28, 2024
1 parent 2af05e4 commit 384977c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/lib/when_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
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 384977c

Please sign in to comment.