Skip to content

Commit dbf2339

Browse files
youtuxolegpidsadnyi
authored andcommitted
Remove compat function get_request_fixture_names
1 parent 7f4ba03 commit dbf2339

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

pytest_bdd/steps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def article(author):
4949
StepError,
5050
)
5151
from .parsers import get_parser
52-
from .utils import get_args, get_request_fixture_names
52+
from .utils import get_args
5353

5454

5555
def get_step_fixture_name(name, type_, encoding=None):
@@ -312,7 +312,7 @@ def fin():
312312
request._fixture_defs[arg] = old_fd
313313

314314
if add_fixturename:
315-
get_request_fixture_names(request).remove(arg)
315+
request._pyfuncitem._fixtureinfo.names_closure.remove(arg)
316316

317317
request.addfinalizer(fin)
318318

@@ -321,4 +321,4 @@ def fin():
321321
# inject fixture value in request cache
322322
request._fixture_defs[arg] = fd
323323
if add_fixturename:
324-
get_request_fixture_names(request).append(arg)
324+
request._pyfuncitem._fixtureinfo.names_closure.append(arg)

pytest_bdd/utils.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ def get_args(func):
2525
return inspect.getargspec(func).args
2626

2727

28-
def get_request_fixture_names(request):
29-
"""Get list of fixture names for the given FixtureRequest.
30-
31-
Get the internal and mutable list of fixture names in the enclosing scope of
32-
the given request object.
33-
34-
Compatibility with pytest 3.0.
35-
"""
36-
return request._pyfuncitem._fixtureinfo.names_closure
37-
38-
3928
def get_parametrize_markers_args(node):
4029
"""In pytest 3.6 new API to access markers has been introduced and it deprecated
4130
MarkInfo objects.

0 commit comments

Comments
 (0)