File: conftest.py

package info (click to toggle)
python-asyncio-mqtt 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 480 kB
  • sloc: python: 1,225; sh: 57; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import annotations

import sys
from typing import Any

import pytest


@pytest.fixture
def anyio_backend() -> tuple[str, dict[str, Any]]:
    if sys.platform == "win32":
        from asyncio.windows_events import WindowsSelectorEventLoopPolicy

        return ("asyncio", {"policy": WindowsSelectorEventLoopPolicy()})
    return ("asyncio", {})