We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WindowsSelectorEventLoopPolicy
1 parent 5fec21a commit 988157eCopy full SHA for 988157e
tests/unit/conftest.py
@@ -3,8 +3,10 @@
3
4
from __future__ import annotations
5
6
+import asyncio
7
import logging
8
import os
9
+import sys
10
from typing import TYPE_CHECKING, cast
11
12
import pytest
@@ -28,6 +30,10 @@
28
30
from crawlee.http_clients._base import HttpClient
29
31
32
33
+if sys.platform == 'win32' and sys.version_info >= (3, 12):
34
+ asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
35
+
36
37
@pytest.fixture
38
def prepare_test_env(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Callable[[], None]:
39
"""Prepare the testing environment by resetting the global state before each test.
0 commit comments