From e308c8d3ac68c3e8802a5181a3e06504751b0815 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 13 Feb 2024 00:14:55 +0000 Subject: [PATCH] ci: don't test gevent on pypy (#3830) --- pytests/pyproject.toml | 2 +- pytests/tests/test_misc.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pytests/pyproject.toml b/pytests/pyproject.toml index 920455ca..126eaf77 100644 --- a/pytests/pyproject.toml +++ b/pytests/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ [project.optional-dependencies] dev = [ - "gevent>=22.10.2", + "gevent>=22.10.2; implementation_name == 'cpython'", "hypothesis>=3.55", "pytest-asyncio>=0.21", "pytest-benchmark>=3.4", diff --git a/pytests/tests/test_misc.py b/pytests/tests/test_misc.py index 2f6cee63..6645f942 100644 --- a/pytests/tests/test_misc.py +++ b/pytests/tests/test_misc.py @@ -2,7 +2,6 @@ import importlib import platform import sys -import gevent import pyo3_pytests.misc import pytest @@ -83,6 +82,8 @@ class ArbitraryClass: def test_gevent(): + gevent = pytest.importorskip("gevent") + def worker(worker_id: int) -> None: for iteration in range(2): d = {"key": ArbitraryClass(worker_id, iteration)}