mirror of https://github.com/scrapy/scrapy.git
Actually run test_set_asyncio_event_loop().
This commit is contained in:
parent
d2e7f6e209
commit
7cfdca8f9b
|
|
@ -4,6 +4,7 @@ from unittest import TestCase
|
|||
|
||||
from pytest import mark
|
||||
|
||||
from scrapy.utils.defer import deferred_f_from_coro_f
|
||||
from scrapy.utils.reactor import (
|
||||
install_reactor,
|
||||
is_asyncio_reactor_installed,
|
||||
|
|
@ -29,6 +30,8 @@ class AsyncioTest(TestCase):
|
|||
|
||||
assert original_reactor == reactor
|
||||
|
||||
@mark.only_asyncio()
|
||||
@deferred_f_from_coro_f
|
||||
async def test_set_asyncio_event_loop(self):
|
||||
install_reactor("twisted.internet.asyncioreactor.AsyncioSelectorReactor")
|
||||
assert set_asyncio_event_loop() is asyncio.get_running_loop()
|
||||
assert set_asyncio_event_loop(None) is asyncio.get_running_loop()
|
||||
|
|
|
|||
Loading…
Reference in New Issue