From 71628074119c42af9cdbf198cf7652331df02e8e Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 26 Dec 2024 12:23:18 +0200 Subject: [PATCH] TST: skip array_conversion tests for python < 3.12 --- array_api_strict/tests/test_array_object.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/array_api_strict/tests/test_array_object.py b/array_api_strict/tests/test_array_object.py index ba2fa48..0c3643d 100644 --- a/array_api_strict/tests/test_array_object.py +++ b/array_api_strict/tests/test_array_object.py @@ -1,3 +1,4 @@ +import sys import operator from builtins import all as all_ @@ -351,6 +352,10 @@ def test_array_properties(): assert b.mT.shape == (3, 2) +@pytest.mark.xfail(sys.version_info.major*100 + sys.version_info.minor < 312, + reason="array conversion relies on buffer protocol, and " + "requires python >= 3.12" +) def test_array_conversion(): # Check that arrays on the CPU device can be converted to NumPy # but arrays on other devices can't. Note this is testing the logic in