Skip to content

Commit c040467

Browse files
authored
Merge branch 'master' into ayfif
2 parents e3a568c + 921b34b commit c040467

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
@@ -450,11 +450,9 @@ def _use_asyncio_selector_if_required(config):
450450
# https://twistedmatrix.com/trac/ticket/9766
451451
# https://github.com/pytest-dev/pytest-twisted/issues/80
452452

453-
if (
454-
config.getoption("reactor", "default") == "asyncio"
455-
and sys.platform == 'win32'
456-
and sys.version_info >= (3, 8)
457-
):
453+
is_asyncio = config.getoption("reactor", "default") == "asyncio"
454+
455+
if is_asyncio and sys.platform == 'win32' and sys.version_info >= (3, 8):
458456
import asyncio
459457

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