Skip to content

Commit 92cafdb

Browse files
authored
Merge branch 'master' into feature/asyncio-reactor-support
2 parents 8735780 + 9626a90 commit 92cafdb

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pytest-twisted - test twisted code with pytest
77
|PyPI| |Pythons| |Travis| |AppVeyor| |Black|
88

99
:Authors: Ralf Schmitt, Kyle Altendorf, Victor Titor
10-
:Version: 1.9
11-
:Date: 2019-01-21
10+
:Version: 1.10
11+
:Date: 2019-04-01
1212
:Download: https://pypi.python.org/pypi/pytest-twisted#downloads
1313
:Code: https://github.com/pytest-dev/pytest-twisted
1414

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):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="pytest-twisted",
8-
version="1.9",
8+
version="1.10",
99
description="A twisted plugin for py.test.",
1010
long_description=long_description,
1111
long_description_content_type="text/x-rst",

testing/test_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
import pytest
55

6-
import pytest_twisted
7-
86

97
ASYNC_AWAIT = sys.version_info >= (3, 5)
108

@@ -37,7 +35,9 @@ def format_run_result_output_for_assert(run_result):
3735
def skip_if_reactor_not(request, expected_reactor):
3836
actual_reactor = request.config.getoption("reactor", "default")
3937
if actual_reactor != expected_reactor:
40-
pytest.skip("reactor is {} not {}".format(actual_reactor, expected_reactor))
38+
pytest.skip(
39+
"reactor is {} not {}".format(actual_reactor, expected_reactor),
40+
)
4141

4242

4343
def skip_if_no_async_await():

0 commit comments

Comments
 (0)