mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Try to fix tests on Windows
This commit is contained in:
parent
a365858d63
commit
812a79481c
2 changed files with 11 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import asyncio
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
|
@ -37,6 +39,13 @@ def pytest_configure(config):
|
|||
config.addinivalue_line("markers", "mongo: marked tests require mongo connection to run")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def event_loop_policy(request):
|
||||
if sys.platform == "win32":
|
||||
return asyncio.WindowsSelectorEventLoopPolicy()
|
||||
return asyncio.DefaultEventLoopPolicy()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def redis_server(request):
|
||||
redis_uri = request.config.getoption("--redis")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue