Skip to content

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

Fix the reactor_pytest fixture.

Andrey Rakhmatullin900de7c14607
diff --git a/conftest.py b/conftest.py
index 56d552953..6d9696a3f 100644
--- a/conftest.py
+++ b/conftest.py
@@ -36,8 +36,11 @@ def pytest_collection_modifyitems(session, config, items):
pass
[email protected](scope='class')
def reactor_pytest(request):
+ if not request.cls:
+ # doctests
+ return
request.cls.reactor_pytest = request.config.getoption("--reactor")
return request.cls.reactor_pytest