Fix running simple tests with --reactor=default. (#6735)

This commit is contained in:
Andrey Rakhmatullin 2025-03-15 23:33:10 +04:00 committed by GitHub
parent 9057bf4e1e
commit 8729247213
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,9 @@ def requires_boto3(request):
def pytest_configure(config):
if config.getoption("--reactor") != "default":
install_reactor("twisted.internet.asyncioreactor.AsyncioSelectorReactor")
else:
# install the reactor explicitly
from twisted.internet import reactor # noqa: F401
# Generate localhost certificate files, needed by some tests