From 071f0f01da78ada01f69ba094545e645bc1c28b1 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Fri, 17 Nov 2023 09:59:31 +0100 Subject: [PATCH] Bit more elegant wat to check for pypy (#419) --- tests/testutils.py | 2 +- tests_mem/testutils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testutils.py b/tests/testutils.py index 6fe56523..567dadea 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -133,6 +133,6 @@ def find_examples(query=None, negative_query=None, return_stems=False): can_use_wgpu_lib = _determine_can_use_wgpu_lib() can_use_glfw = _determine_can_use_glfw() is_ci = bool(os.getenv("CI", None)) -is_pypy = "__pypy__" in sys.builtin_module_names +is_pypy = sys.implementation.name == "pypy" wgpu_backend = get_wgpu_backend() is_lavapipe = wgpu_backend.lower() == "cpu vulkan" diff --git a/tests_mem/testutils.py b/tests_mem/testutils.py index dae6b3bb..36d75029 100644 --- a/tests_mem/testutils.py +++ b/tests_mem/testutils.py @@ -57,7 +57,7 @@ def _determine_can_use_pyside6(): can_use_glfw = _determine_can_use_glfw() can_use_pyside6 = _determine_can_use_pyside6() is_ci = bool(os.getenv("CI", None)) -is_pypy = "__pypy__" in sys.builtin_module_names +is_pypy = sys.implementation.name == "pypy" TEST_ITERS = None