Fix --trace option with yield tests.
This commit is contained in:
parent
bc268a58d1
commit
b75320ba95
|
@ -83,7 +83,7 @@ def pytest_pyfunc_call(pyfuncitem):
|
||||||
testfunction = pyfuncitem.obj
|
testfunction = pyfuncitem.obj
|
||||||
pyfuncitem.obj = pdb.runcall
|
pyfuncitem.obj = pdb.runcall
|
||||||
if pyfuncitem._isyieldedfunction():
|
if pyfuncitem._isyieldedfunction():
|
||||||
pyfuncitem.args = [testfunction, pyfuncitem._args]
|
pyfuncitem._args = [testfunction, *pyfuncitem._args]
|
||||||
else:
|
else:
|
||||||
if "func" in pyfuncitem._fixtureinfo.argnames:
|
if "func" in pyfuncitem._fixtureinfo.argnames:
|
||||||
raise ValueError("--trace can't be used with a fixture named func!")
|
raise ValueError("--trace can't be used with a fixture named func!")
|
||||||
|
|
Loading…
Reference in New Issue