From: Daniele Varrazzo Date: Tue, 29 Jun 2021 02:40:03 +0000 (+0100) Subject: Skip asyncio tests on windows X-Git-Tag: 3.0.dev0~4^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ef9e5c0653b12272c803895a1a0c428f709ef58;p=thirdparty%2Fpsycopg.git Skip asyncio tests on windows --- diff --git a/tests/conftest.py b/tests/conftest.py index e42f141ae..8f3c36e2a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +import sys import asyncio import inspect @@ -46,6 +47,13 @@ def pytest_report_header(config): return [f"asyncio loop: {loop}"] +def pytest_runtest_setup(item): + # Skip asyncio tests on Windows: they just don't seem to work + if sys.platform == "win32": + for mark in item.iter_markers(name="asyncio"): + pytest.skip(f"cannot run asyncio tests on {sys.platform}") + + @pytest.fixture def retries(request): """Retry a block in a test a few times before giving up."""