mirror of https://github.com/scrapy/scrapy.git
Fix the reactor_pytest fixture.
This commit is contained in:
parent
039e6fe691
commit
900de7c146
|
|
@ -36,8 +36,11 @@ def pytest_collection_modifyitems(session, config, items):
|
|||
pass
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@pytest.fixture(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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue