Skip to content

Commit 93badca

Browse files
authored
Merge branch 'master' into pypy
2 parents e3213ff + 921b34b commit 93badca

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pytest_twisted.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,9 @@ def _use_asyncio_selector_if_required(config):
333333
# https://twistedmatrix.com/trac/ticket/9766
334334
# https://github.com/pytest-dev/pytest-twisted/issues/80
335335

336-
if (
337-
config.getoption("reactor", "default") == "asyncio"
338-
and sys.platform == 'win32'
339-
and sys.version_info >= (3, 8)
340-
):
336+
is_asyncio = config.getoption("reactor", "default") == "asyncio"
337+
338+
if is_asyncio and sys.platform == 'win32' and sys.version_info >= (3, 8):
341339
import asyncio
342340

343341
selector_policy = asyncio.WindowsSelectorEventLoopPolicy()

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ download=true
2626

2727
[testenv:linting]
2828
deps=flake8
29-
commands=flake8 *.py testing
29+
commands=flake8 setup.py pytest_twisted.py testing
3030

3131
[flake8]
3232
ignore=N802

0 commit comments

Comments
 (0)