Skip to content

Commit

Permalink
Merge pull request #446 from frexvahi/pytest-getfixturevalue
Browse files Browse the repository at this point in the history
Avoid DeprecationWarning for getfuncargvalue in recent pytest
  • Loading branch information
mattbennett committed Jun 21, 2017
2 parents e489212 + c2681ec commit 43e76af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nameko/testing/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ def test_bar(rabbit_config, container_factory):
reorder_fixtures = ('container_factory', 'runner_factory', 'rabbit_config')
for fixture in reorder_fixtures:
if fixture in request.funcargnames:
request.getfuncargvalue(fixture)
# getfuncargvalue is renamed to getfixturevalue in pytest 3.0
if hasattr(request, 'getfixturevalue'):
request.getfixturevalue(fixture) # pragma: no cover
else:
request.getfuncargvalue(fixture) # pragma: no cover

consumers = []

Expand Down

0 comments on commit 43e76af

Please sign in to comment.