Skip to content

Commit

Permalink
Support for CallSpec2 API change in PyTest 3.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jul 12, 2018
1 parent 8b84983 commit 22077c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytest_lazyfixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ def normalize_call(callspec, metafunc, valtype, used_keys=None):
fdef = fm.getfixturedefs(fname, nodeid)
if fname not in callspec.params and fdef and fdef[-1].params:
for i, param in enumerate(fdef[0].params):
newcallspec = callspec.copy(metafunc)
try:
newcallspec = callspec.copy()
except TypeError:
# pytest < 3.6.3
newcallspec = callspec.copy(metafunc)

# TODO: for now it uses only function scope
# TODO: idlist
Expand Down

0 comments on commit 22077c5

Please sign in to comment.