Fix python 2 issues

This commit is contained in:
Jeffrey Rackauckas 2018-07-02 20:20:42 -07:00
parent 2f1a2cf07f
commit 4afb8c428b
1 changed files with 3 additions and 1 deletions

View File

@ -127,7 +127,9 @@ def _test_pytest_function(pyfuncitem):
testfunction = pyfuncitem.obj
pyfuncitem.obj = pdb.runcall
if pyfuncitem._isyieldedfunction():
pyfuncitem._args = [testfunction, *pyfuncitem._args]
arg_list = list(pyfuncitem._args)
arg_list.insert(0, testfunction)
pyfuncitem._args = tuple(arg_list)
else:
if "func" in pyfuncitem._fixtureinfo.argnames:
raise ValueError("--trace can't be used with a fixture named func!")