Skip to content

Commit 563efb1

Browse files
committed
Stop checking for pyfuncitem._isyieldedfunction()
Removed in pytest v4.4.0. pytest-dev/pytest@47bd168
1 parent 55576a0 commit 563efb1

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

pytest_twisted.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,14 @@ def stop_twisted_greenlet():
107107

108108
def _pytest_pyfunc_call(pyfuncitem):
109109
testfunction = pyfuncitem.obj
110-
if pyfuncitem._isyieldedfunction():
111-
return testfunction(*pyfuncitem._args)
110+
funcargs = pyfuncitem.funcargs
111+
if hasattr(pyfuncitem, "_fixtureinfo"):
112+
testargs = {}
113+
for arg in pyfuncitem._fixtureinfo.argnames:
114+
testargs[arg] = funcargs[arg]
112115
else:
113-
funcargs = pyfuncitem.funcargs
114-
if hasattr(pyfuncitem, "_fixtureinfo"):
115-
testargs = {}
116-
for arg in pyfuncitem._fixtureinfo.argnames:
117-
testargs[arg] = funcargs[arg]
118-
else:
119-
testargs = funcargs
120-
return testfunction(**testargs)
116+
testargs = funcargs
117+
return testfunction(**testargs)
121118

122119

123120
def pytest_pyfunc_call(pyfuncitem):

0 commit comments

Comments
 (0)