Skip to content

Commit 51c383d

Browse files
committed
Use staticmethod() for reactor fixture
1 parent 9a6cb35 commit 51c383d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_twisted.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def pytest_addoption(parser):
7474

7575
def pytest_configure(config):
7676
# TODO: why is the parameter needed?
77-
def default_reactor(_):
77+
def default_reactor():
7878
print('checkpoint', 'pytest-twisted', 'reactor (default)')
7979
global reactor
8080
from twisted.internet import reactor
@@ -107,7 +107,7 @@ def qt5_reactor(qapp):
107107
reactor_fixture = default_reactor
108108

109109
class ReactorPlugin(object):
110-
reactor = (
110+
reactor = staticmethod(
111111
pytest.fixture(scope='session', autouse=True)(reactor_fixture)
112112
)
113113

0 commit comments

Comments
 (0)