Skip to content

Commit 7c76051

Browse files
committed
Update CONTRIBUTING.rst
1 parent c65bc6b commit 7c76051

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ What it takes to add a new reactor:
44
* In ``pytest_twisted.py``
55

66
* Write an ``init_foo_reactor()`` function
7-
* Add ``'foo': init_foo_reactor,`` to ``_reactor_fixtures`` where the key will be the string to be passed such as ``--reactor=foo``.
7+
* Add ``'foo': init_foo_reactor,`` to ``reactor_installers`` where the key will be the string to be passed such as ``--reactor=foo``.
88

99
* In ``testing/test_basic.py``
1010

pytest_twisted.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def in_reactor(d, f, *args):
119119
return True
120120

121121

122-
@pytest.fixture(scope="session", autouse=True)
122+
@pytest.fixture(scope='session', autouse=True)
123123
def twisted_greenlet(request):
124124
request.addfinalizer(stop_twisted_greenlet)
125125
return _instances.gr_twisted
@@ -140,7 +140,7 @@ def init_default_reactor():
140140

141141
_install_reactor(
142142
reactor_installer=twisted.internet.default.install,
143-
reactor_type=reactor_type,
143+
reactor_type=reactor_type
144144
)
145145

146146

@@ -149,13 +149,13 @@ def init_qt5_reactor():
149149

150150
_install_reactor(
151151
reactor_installer=qt5reactor.install,
152-
reactor_type=qt5reactor.QtReactor,
152+
reactor_type=qt5reactor.QtReactor
153153
)
154154

155155

156-
_reactor_installers = {
156+
reactor_installers = {
157157
'default': init_default_reactor,
158-
'qt5reactor': init_qt5_reactor,
158+
'qt5reactor': init_qt5_reactor
159159
}
160160

161161

@@ -168,7 +168,7 @@ def _install_reactor(reactor_installer, reactor_type):
168168
raise WrongReactorAlreadyInstalledError(
169169
'expected {} but found {}'.format(
170170
reactor_type,
171-
type(twisted.internet.reactor),
171+
type(twisted.internet.reactor)
172172
)
173173
)
174174
import twisted.internet.reactor
@@ -181,9 +181,9 @@ def pytest_addoption(parser):
181181
group.addoption(
182182
'--reactor',
183183
default='default',
184-
choices=tuple(_reactor_installers.keys()),
184+
choices=tuple(reactor_installers.keys())
185185
)
186186

187187

188188
def pytest_configure(config):
189-
_reactor_installers[config.getoption('reactor')]()
189+
reactor_installers[config.getoption('reactor')]()

0 commit comments

Comments
 (0)