From 407558c4a42feac8d201ef44353e5d3bf6c65b15 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Thu, 5 Jun 2025 12:26:13 +0500 Subject: [PATCH] Install the Twisted reactor explicitly in tests. --- tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 3c7d40c..fe58743 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -33,3 +33,7 @@ def set_jobkeyenvironment(monkeypatch): monkeypatch.setenv('SCRAPY_JOB', '1/2/3') monkeypatch.setenv('SHUB_JOBAUTH', TEST_AUTH) monkeypatch.setenv('SHUB_STORAGE', 'storage-url') + + +# install the reactor explicitly, as Scrapy including scrapy.utils.test.get_crawler() assumes it's installed +from twisted.internet import reactor