From 4afb8c428b2541afae9a80983191a351e0edc3dd Mon Sep 17 00:00:00 2001 From: Jeffrey Rackauckas Date: Mon, 2 Jul 2018 20:20:42 -0700 Subject: [PATCH] Fix python 2 issues --- src/_pytest/debugging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py index 2bf290de4..9991307d0 100644 --- a/src/_pytest/debugging.py +++ b/src/_pytest/debugging.py @@ -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!")