Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

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

Andrey Rakhmatullin872924721344
diff --git a/conftest.py b/conftest.py
index 9999e41d2..8e0c429a0 100644
--- a/conftest.py
+++ b/conftest.py
@@ -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